e MATLAB to write a program which will provide optimal angle that the bees should be prefer to minimize the surface area.
1 view (last 30 days)
Show older comments
I have solved some of the parts but I'm feeling difficulty in other parts please help me.
My Matlab code:
clear all; clc;
disp('Name= xxxx');
disp('ID= xxxxx');
disp('Dept= A.I');
input('Press ''Enter'' to continue...','s');
A = input('input the angle :');
h = input('input the height h:');
s = input('input the side length s:');
%below code founded on internet
%Calling the fucntion
surfaceArea(2,4)
surfaceArea(6,3)
surfaceArea(8,7)
%Required Function
function area = surfaceArea(r,h)
area = 2*pi*r.^2 + h*2*pi*r;
end
Plz i request you to help me in it, Thanks
3 Comments
Walter Roberson
on 2 Dec 2022
I do not know which is the (one, single) optimization technique that you learned in class, so it is difficult for me to suggest how that technique might be programmed.
For displaying values... see the documentation for fprintf()
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!