symbolic of cos with power
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a long equation with cosine with powers (e.g., (cos(a))^3, (cos(a))^5, ..). Then I need to reduce each power of cosine to unity (but angle is higher): e.g., (cos(a))^2 -> (1+cos(2a))/2.
Here are more examples which reduce various powers:
Anyone who knows how to reduce my cosines to unity of power of cosine, using symbolic of matlab?
답변 (1개)
Karan Gill
2016년 12월 9일
Here, you want to change the input of "cos" from "x" to "2*x". Essentially, you want make the argument of "cos" more complicated. The "combine" command does that.
syms x
f = cos(x)^2;
combine(f,'sincos')
ans =
cos(2*x)/2 + 1/2
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!