I know this is a super simple problem that has been discussed before but I cannot find the answer for the life of me.
All I want is for this program to output the variable as Y and have it correctly place it in the workspace as Y.
What am I doing wrong?Code:function [y] = stress(Ri,Ro,R,Delta,E) %stress = stress(Ri,Ro,R,Delta,E) y = Delta*E/R*1/((R^2+Ri^2)/(R^2-Ri^2)+(R^2+Ro^2)/(R^2-Ro^2)); end
Referring to the attached screenshot
The output of the function is saved as ANS when I want it saved as Y.
See how I inputted a variable for 1, ran my program and it didn't change the value of Y but rather added another scalar named ANS
Thanks for you help