MATLAB: Hi,I don’t understand why this is not right,I am a completely new learner!

plot3

T=1; lamda=0.4; gamma=1.2; theta=0.1; x=1:100; t=0.1; U=lamda/(0.5*theta^2+lamda); V0(x)=U.*exp(-gamma.*x)-(1-U).*exp(-(0.5.*theta.^2+lamda).*(T-t)).*exp(-gamma.*x); plot3(V0(x),x)
the error is: Error using plot3 Not enough input arguments.

Best Answer

plot3 assumes three arguments. Use plot instead
plot(x, V0)