
Reference to a cleared variable
Posted:
Mar 30, 2011 11:08 PM


hello everymaster... I have a question that I don't know how to solution ...May u help me? thank you..
My .m........ ============================================= function dhdt = tankfill(t,h) clc;clear all; A = 10 + 4*sin(t); H = 2*sqrt(h); dhdt = A  H;
tspan = [0 30]; h0 = 1; [t,h] = ode45('tankfill',tspan,h0); plot(t,h) =============================================
command windows below... ========================== ??? Reference to a cleared variable t.
Error in ==> tankfill at 3 A = 10 + 4*sin(t); >> ==========================

