function [V,S] = prism (H,W,L) %primary function
h=H;w=W;l=L;V =vlm; h;w;l;S = sfa; h;w;l;%Prm =prm; w;l;
function V = vlm; h;w;l; %subfunction for calculating the volume
V = (h*w*l); function S= sfa; h;w;l; %subfunction for calculating the surface area
S = 2*(h*l+h*w+w*l); % function Prm = prm, w;l; %subfunction for calculating the perimeter
% Prm = (2*w+l*2);
% end
end end end
MATLAB: How can i fix this error?why is the function unused even though its written in the same manner as the preceding function that work
nestedfunctionunusedvariable
Best Answer