The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Reference to a cleared variable
Replies: 12   Last Post: Dec 4, 2013 11:13 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ying-Ju Chen

Posts: 6
Registered: 3/30/11
Reference to a cleared variable
Posted: Mar 30, 2011 11:08 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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);

command windows below...
??? Reference to a cleared variable t.

Error in ==> tankfill at 3
A = 10 + 4*sin(t);


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.