MATLAB: I just need this one TINY code to execute :( Any idea what the problem with this simple equation is

equationinputmathematicsMATLABsolve

I need to put this Either in another function or as a seperate function. Or the script. It's accepting L, M, and b values, but i am not getting an output value for y.
suggestions?
prompt1 = 'Enter value of L';
prompt2 = 'Enter value of M';
prompt3 = 'Enter value of b';
L = input(prompt1)
M = input(prompt2)
b = input(prompt3)
y = (12*9.81*L)/(4*L^.2)+(b.^2)-(12*L*M)+(12*M.^2);

Best Answer

You need to print the output. For example using disp()
prompt1 = 'Enter value of L';
prompt2 = 'Enter value of M';
prompt3 = 'Enter value of b';
L = input(prompt1)
M = input(prompt2)
b = input(prompt3)
y = (12*9.81*L)/(4*L^.2)+(b.^2)-(12*L*M)+(12*M.^2);
disp(y)
Or remove the semicolon from the last line
y = (12*9.81*L)/(4*L^.2)+(b.^2)-(12*L*M)+(12*M.^2)
%^ removed semicolon from here