Thread Subject: using solve() with variables from the workspace

Subject: using solve() with variables from the workspace

From: David Doria

Date: 1 May, 2008 21:46:04

Message: 1 of 2

Everything I see seems to not use any variables from the
workspace

ie I want to do this

x=5;
solve('y+x=9','y')

I would like to get back y=4

I would like to do this with both double and sym type
variables. Is it possible?

Thanks,

Dave

Subject: using solve() with variables from the workspace

From: David Doria

Date: 2 May, 2008 12:35:04

Message: 2 of 2

It seems I was misunderstanding subs() completely - it does
exactly what I was asking

c=2;
temp=solve('x+10=c','x')
subs(temp)

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com