Hello, I am trying to get my function file to only show the information i need, however it shows an additional number that i know is from the first equation (x).
I only want the x,y,z variables to show on the command window.
My function file:
function [x,y,z] = func(rint,rext,g,e)x=(2*(pi)*(rint)*500)+(2*(pi)*(rext)*500);fprintf('x %0.1f\n',x);V=(pi)*(((rext)^2)-((rint)^2))*500;y=0.0015*V;fprintf('y %0.1f\n',y);z=(g*y*e)-(y)-(2000);fprintf('z %0.1f\n',z);end
My script file:
clear allclcrint=2.5;rext=2.8;e=5;g=500;disp(func(rint,rext,g,e));----------------------------My Command window:x 16650.4y 3.7z 7362.1 1.6650e+04
I don't know what the last number is and i would like to know why it pops up so i can remove it.
Best Answer