Write The MATLAB SCRIPT for:
An open-top box is constructed from a rectangular piece of sheet
metal measuring 10 by 16 inches. Square of what size (accurate to
10-9 inch) should be cut from the corners if the volume
of the box is to be 100 cubic inches?
Notes: to roughly estimate the locations of the
roots of the equation and then approximate the roots to this
equation using Newton Iteration
method.
Please don't give me the Matlab Commands for this. I need "Matlab Script" as its solution.
%%Matlab code for finding root using Newton method
clear all
close all
%Function for which root have to find
fun=@(x) x.*(10-2.*x).*(16-2.*x)-100;
%plotting of the function
xx=linspace(0,4,1001);
yy=fun(xx);
plot(xx,yy)
xlabel('x')
ylabel('y')
title('f(x) vs x plot')
%displaying the function
fprintf('For the function\n')
disp(fun)
[root]=newton_method(fun,0,1000);
fprintf('Value of x =%f.\n',root)
%Matlab function for Newton Method
function [root]=newton_method(fun,x0,maxit)
syms x
g1(x) =diff(fun,x); %1st Derivative of this
function
xx=x0;
%initial guess]
%Loop for all intial guesses
n=eps; %error limit for close itteration
for i=1:maxit
x2=double(xx-(fun(xx)./g1(xx))); %Newton Raphson Formula
cc=abs(fun(x2));
%Error
err(i)=cc;
xx=x2;
if cc<=n
break
end
end
root=xx;
end
%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%
Write The MATLAB SCRIPT for: An open-top box is constructed from a rectangular piece of sheet metal measuring 10 by 16 i...
An open box is to be constructed from a square piece of sheet metal by removing a square of side 5 feet from each corner and turning up the edges. If the box is to hold 720 cubic feet, what should be the dimensions of the sheet metal? What is the length of a side of the square piece of sheet metal? feet
A box with an open top is to be constructed from a 8m x 3m rectangular metal sheet, by cutting out ase Question 16 rom each of the four corners and bending up the sides. Find the AREA of a square corner that must be con open box to attain maximum volume. ma m2
An open box is to be made from a rectangular piece of tin 12 inches long and 10 inches wide by cutting pieces of x-inch square from each corner and bonding up the sides. find the formula that expresses the volume of the box as a function of x.
Please answer the questions using MATLAB Exercise 1 Dimensions of the Largest Box An open bols to be made rom ฮ rectangular poce of cardboard measuring 8 x48. The box s made by cutting o ual squares rom cach of its 4 corners and turning up the sides. Suggestion: you can try making one yourself with of paper) spare piece u8. 1. Let x be the side of a square removed from each corner. Express the volume v of the...
Consider the following problem: A box with an open top is to be constructed from a square piece of cardboard, 3 ft wide, by cutting out a square from each of the four corners and bending up the sides. Find the largest volume that such a box can have. (a) Draw several diagrams to illustrate the situation, some short boxes with large bases and some tall boxes with small bases. Find the volumes of several such boxes. (b) Draw a diagram illustrating the general situation. Let...
A candy box is made from a piece of cardboard that measures 25 by 14 inches. Squares of equal size will be cut out of each corner. The sides will then be folded up to form a rectangular box. Find the length of the side of the square that must be cut out if the volume of the box is to be maximized. What is the maximum volume? 14 in. A square with a side of length of 2.88 inches...