MATLAB Answers

break function into individual variable

2 views (last 30 days)
chen TIANLE on 20 Oct 2021
Answered: Walter Roberson on 20 Oct 2021
i have this equation
y = C1*cos(2*x) - C2*sin(2*x)
how do i code to break into this independent parts ?
Y1= C1*cos(2*x)
Y2= -C2*sin(2*x)
thanks in advance

Answers (1)

Walter Roberson
Walter Roberson on 20 Oct 2021
syms C1 C2 x
y = C1*cos(2*x) - C2*sin(2*x)
y = 
Y1 = children(y, 1)
Y1 = 
Y2 = children(y, 2)
Y2 = 

Community Treasure Hunt

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

Start Hunting!