I need to solve the following equation and plot the results. Here is my code:
syms t X F = zeta*(1-3*(X^2) + 2*(X^3) ) ==t %zeta is a constant
X = solve(F, X) %the solved expression of X
t = linspace(0,100) plot(t, X)
The problem is that I get an error "data must be numeric, datetime, duration or an array convertible to double". I am not sure I understand what is needdd to be done here in order to plot the solved equation.
Please note that plotting the function F using fplot is not a problem but that is not what I want. I need to plot t vs X. Could you please help?
Best Answer