HOW to write cos^2(t) in matlap

811 visualizzazioni (ultimi 30 giorni)
Saad Almalki
Saad Almalki il 18 Giu 2020
HOW to write cos^2(t) in matlap

Risposta accettata

madhan ravi
madhan ravi il 18 Giu 2020
Modificato: madhan ravi il 18 Giu 2020
t = 0:pi:2*pi;
cos(t).^2 % basic question , start with MATLAB Onramp course

Più risposte (2)

Brigid Welch
Brigid Welch il 19 Gen 2022
how to write cos(t)^2
  1 Commento
Walter Roberson
Walter Roberson il 19 Gen 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

Accedi per commentare.


Soledad Rodriguez
Soledad Rodriguez il 1 Apr 2022
yb = cos^2 (5x) / x^2
  2 Commenti
Torsten
Torsten il 1 Apr 2022
(cos(5*x)).^2./x.^2
Walter Roberson
Walter Roberson il 1 Apr 2022
Also cos(5*x).^2./x.^2 and (cos(5*x)./x).^2

Accedi per commentare.

Categorie

Scopri di più su Creating and Concatenating Matrices 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