Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
symbolic math

Subject: symbolic math

From: Rishabh

Date: 12 Aug, 2010 15:08:05

Message: 1 of 3

How do I substitute numeric values for symbols that I have created. I have my solution in terms of symbols. Now, I want to a definite ans. I am solving 3 simultaneous differential equations that involve 5 symbols. Help me as I am relatively new to MATLAB...

Thank you..

Subject: symbolic math

From: Kittithad Wangveerathananon

Date: 12 Aug, 2010 15:21:09

Message: 2 of 3

The following example should help you with the numeric substituition to symbol.

syms a b c x
x=solve(a*x^2+b*x+c,'x');
xsub=subs(x,{a,b,c},{1,2,3});


"Rishabh " <rishabhladha17@gmail.com> wrote in message <i412ol$1de$1@fred.mathworks.com>...
> How do I substitute numeric values for symbols that I have created. I have my solution in terms of symbols. Now, I want to a definite ans. I am solving 3 simultaneous differential equations that involve 5 symbols. Help me as I am relatively new to MATLAB...
>
> Thank you..

Subject: symbolic math

From: Star Strider

Date: 18 Aug, 2010 16:26:24

Message: 3 of 3

"Rishabh " <rishabhladha17@gmail.com> wrote in message <i412ol$1de$1@fred.mathworks.com>...
> How do I substitute numeric values for symbols that I have created. I have my solution in terms of symbols. Now, I want to a definite ans. I am solving 3 simultaneous differential equations that involve 5 symbols. Help me as I am relatively new to MATLAB...
>
> Thank you..



I suggest you read "Generating Code from Symbolic Expressions" (http://www.mathworks.com/access/helpdesk/help/toolbox/symbolic/brt7nuv.html). That may be best unless you need only one answer for one particular set of variables.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us