Hello, any help would be greatly appreciated!!!!
Getting the following error on line 16:
Invalid Syntax at 'R'. A '(' Might be missing a closing ')'
Here is my code below:
%This program determines the height H for given values of r, R, and total
%volume VTotal
%
clearclcr=30;%Radius of cylinder in ft
R=45;%Radius of cylinder cap in ft
V=120000^3;%Total Volume of cylindrical silo
x=asind(r/R);%Calculations for Theta
h=R*(1-cos(x));%Height of Cylinder cap
Vcap=(1/3)*pih^2*(3R-h);%Volume of Cylinder cap
Vcyl=(V-Vcap);%Volume of Cylinder
disp('Height of Cylinder is:')H=Vcyl/(pi(r)^2);%End-of-file
Best Answer