How do i use an unknown from an unsolved identity in my equations?
Show older comments
Hello, I'm a newbie to MATLAB and am having a problem with something which I believe should be quite simple.
I have a comlicated identity, the unknown of which I need in another equation. The code below shows a simplified version of what I'm trying to do.
clear all
clc
syms m
solve('m+6=4-m', m)
x=[0:1:10];
for i=1:11
y(i)=m*x(i)+5;
end
hold on
plot (x, y)
It's easy to see here that m = -1, and if I replace lines 3 and 4 with "m=-1;", I get my graph. However my identity is much more complicated than that shown and I can't rearrange it as "m=...". Can anyone help? I hope this was clear, please let me know if more information is needed.
These are the error messages I'm getting:
Error using sym/solve>getEqns (line 418)
List of equations must not be empty.
Error in sym/solve (line 226)
[eqns,vars,options] = getEqns(varargin{:});
Error in Test (line 4)
solve('m+6=4-m', m)
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!