My function with code prompt being user input.
function [v]=Deflection_Caabt(x)
if (0 < prompt) && (prompt <= 120)
(1/(3.19*10e9)) * 800*xe3 - 13.68 * 10e6 - 2.5*xe4;
else
(120 < prompt) && (prompt <= 240);
(1/(3.19*10e9))*800*xe3-(13.68*10e6)-2.5*xe4+2.5*(x-120)*e4;
Elseif
(240 < prompt) && (prompt <= 360);
(1/(3.19*10e9))*(800*xe3-(13.68*10e6)-2.5*x^4+2.5*x-120e4+600*(x-240)*e3);
end
1 Comment
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/481088-error-function-definition-not-supported-in-this-context-create-functions-in-code-file#comment_747504
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/481088-error-function-definition-not-supported-in-this-context-create-functions-in-code-file#comment_747504
Sign in to comment.