Randomly pick value in matrix and generate the function
Show older comments
Hi I want to builld a matlab code that can generate the plot and calculate the volume
L=[147:50:180]
R=[157:50:180]

is it possible to plot it ?
Answers (1)
David Hill
on 19 May 2021
[r,l]=meshgrid(157:173,147:180);
v=pi*r.^3+pi*r.^2.*l;%all possibilities
k=randi(numel(r));
A=[r(k),l(k),V(k)];%random element of v
2 Comments
Dai Nguyen
on 19 May 2021
David Hill
on 19 May 2021
surf(r,l,v);%data is all recorded in r, l, and v
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!