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

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
code generation Star Strider 18 Aug, 2010 12:29:14
subs Star Strider 18 Aug, 2010 12:29:14
symbolic Star Strider 18 Aug, 2010 12:29:14
differential equat... Rishabh 12 Aug, 2010 11:10:31
symbolic Rishabh 12 Aug, 2010 11:10:31
rssFeed for this Thread

Contact us