I want to simplify a equation in matlab that has terms of sin(t) and cos(t). When i run it it shows unrecognised variable. What should i do?

1 view (last 30 days)
This is the code i wrote
Op1("I4")*cos(t)
Here
Op1("I4")=[1 0 0 0; 0 1 0 0;0 0 1 0; 0 0 0 1]
Op1
I want the result to be displayed in terms of cos(t). Please help me out.

Answers (1)

KSSV
KSSV on 24 Jun 2021
syms t
Op1 = [1 0 0 0; 0 1 0 0;0 0 1 0; 0 0 0 1] ;
Op1*cos(t)
ans = 

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!