Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

Topic: dow define a numeric variable (no symbolic)?
Replies: 2   Last Post: May 9, 2013 8:32 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 5,674
Registered: 2/7/05
Re: dow define a numeric variable (no symbolic)?
Posted: May 9, 2013 7:21 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 5/9/2013 2:19 AM, ghasem wrote:
>
>
> obviously,I get this error:
> ??? Undefined function or variable 'bet'.
> because I don't define bet in gam,T,tau expressions.
> how define "bet" as a numeric unknown (I don't want use from "syms bet")?
>


You can't.

Matlab is not C nor C++ nor Pascal.

In Matlab, you can only define and assign a value at
same time, as in

x=5;

You can't just write

x;
or

var x;

Unless it is a sym, then you can define it as symbol
with no value.

But for numeric, it must be defined and given a value
at same time.

--Nasser



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.