HOW to write cos^2(t) in matlap
805 views (last 30 days)
Show older comments
Saad Almalki
on 18 Jun 2020
Commented: Walter Roberson
on 1 Apr 2022
HOW to write cos^2(t) in matlap
2 Comments
Accepted Answer
madhan ravi
on 18 Jun 2020
Edited: madhan ravi
on 18 Jun 2020
t = 0:pi:2*pi;
cos(t).^2 % basic question , start with MATLAB Onramp course
0 Comments
More Answers (2)
Brigid Welch
on 19 Jan 2022
how to write cos(t)^2
1 Comment
Walter Roberson
on 19 Jan 2022
If t is a scalar, then exactly like you wrote will work, cos(t)^2
If t is a vector or array, you will likely need cos(t).^2
See Also
Categories
Find more on Creating and Concatenating Matrices 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!