I'm taking a course in matlab and was given the assignment attached.
below are my codes for my function. But when I enter 3 as the input value for the radius I get the output of 810.4933 which I'm pretty sure is not right.
function arad=funcup(r)
v=10;
arad=pirsqrt((r^2)+((3*v/pi*r^2)^2));
end
I didn't place any sets of codes because I don't know where to start. He also mentioned that for (b.) instead of using a global variable we could use a constant since he hasn't taught global variables.
Any help will be greatly appreciated.