How do I simplify my trignometric matrices??

I have tried using "simplify" command. MATLAB simplifies it to some extent but not completely. The code is as below:
if true
%clc
clear all
syms o l1 l2 l0;
A=[ cos(o) -sin(o) 1;
cos(o-120) -sin(o-120) 1;
cos(o-240) -sin(o-240) 1;
]
X=inv(A)
W=simplify(X)
end
The anwer of the first element of matrix "W" is shown as
if true
% -(sin(o - 120) - sin(o - 240))/(2*sin(120) - sin(240))
end
clearly which can be further simplified (by applying formulas of Sin(a-b)) to give answer of Cos(o)... What am I doing wrong here??

1 件のコメント

Torsten
Torsten 2016 年 3 月 30 日
First of all, replace 120 by 2/3*pi and 240 by 4/3*pi (sin and cos work with radians, not with degrees).
Best wishes
Torsten.

サインインしてコメントする。

 採用された回答

Star Strider
Star Strider 2016 年 3 月 30 日

0 投票

Tell the simplify function to keep working on it:
W=simplify(X, 'steps', 20)
Also, as Torsten mentioned, the Symbolic Toolbox trigonometric functions require their arguments be in radians not degrees, so multiply the constants by ‘pi/180’.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

質問済み:

2016 年 3 月 30 日

回答済み:

2016 年 3 月 30 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by