Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab Symbolic Problem - HELP needed

Status
Not open for further replies.

Trenera

Newbie level 3
Joined
May 14, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,301
Hi everyone!

I'm currently working on a problem, but I'll simplify it so that everyone can know what I mean.

This is the file:
----------------------------------------------------------------------

close all
clear all
clc

syms x

a=5;
b=7;
c=a+b;

solve('x/2*a-7*b-13*c+14*a*b*x*c-34*x-7*b')
----------------------------------------------------------------------

Result:

ans =

(28*b + 26*c)/(a + 28*a*b*c - 68)

How can I get the value of "x" in a normal number, not symbolic expression?

Also

If I use:

eval('x/2*a-7*b-13*c+14*a*b*x*c-34*x-7*b')

I get this:

ans =

(11697*x)/2 - 254


All I need is to get the value of x....

Thanks in Advance!
 

hi
this code solves the equation x/2*a-7*b-13*c+14*a*b*x*c-34*x-7*b and get answer:
% ---------------------------------------------------------------------------
syms x
result=solve('x/2*a-7*b-13*c+14*a*b*x*c-34*x-7*b');
a=5;
b=7;
c=a+b;
x=eval(result)
% end-------------------------------------------------------------------
 
Last edited:

hi
this code solves the equation x/2*a-7*b-13*c+14*a*b*x*c-34*x-7*b and get answer:
% ---------------------------------------------------------------------------
syms x
result=solve('x/2*a-7*b-13*c+14*a*b*x*c-34*x-7*b');
a=5;
b=7;
c=a+b;
x=eval(result)
% end-------------------------------------------------------------------

Thanks!!!!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top