equationsToMatrix output defaults to negative
1 次查看(过去 30 天)
显示 更早的评论
I'm trying to use "equationsToMatrix" to put a system of symbolic equations into matrix form, but I'm getting the negative of what I want.
For example I have two vectors:
x1=[a1;b1;c1;d1];
x2=[a2;b2;c2;d2];
And I want to convert the following into the form x2=A*x1:
m = [a1*exp((R*pi*(alpha_ccw/2 + beta*1i))/2);
b1*exp(-(R*pi*(alpha_ccw/2 + beta*1i))/2);
c1*exp((R*pi*(alpha_cw/2 - beta*1i))/2);
d1*exp(-(R*pi*(alpha_cw/2 - beta*1i))/2)]
So I use:
[Cprop_bottom,b] = equationsToMatrix(x2==m,x1)
I get the right answer but the negative. Essentially it says that both 'b' and 'Cprop_bottom' are negative so the solution is still true but not expected.
Am I doing something wrong? I could work around it by subsituting one of the 'b' output variables for a positive number and seeing if the result is negative, but I would prefer understand why the output defaults to negative to begin with.
Thanks in advance!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!