break function into individual variable

1 visualizzazione (ultimi 30 giorni)
chen TIANLE
chen TIANLE il 20 Ott 2021
Risposto: Walter Roberson il 20 Ott 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

Risposte (1)

Walter Roberson
Walter Roberson il 20 Ott 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 = 

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by