symbolic of cos with power

조회 수: 2 (최근 30일)
student
student 2014년 4월 7일
답변: Karan Gill 2016년 12월 9일
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
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

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by