translate equation to matlab code

19 visualizzazioni (ultimi 30 giorni)
Or Peer
Or Peer il 16 Mag 2019
Risposto: Giuseppe il 24 Apr 2024 alle 13:24
Capture_equation.PNG
hellow I would like to translate this equation to matlab code, I am new to matlab language and syntax and would very much appreciate help.
  1 Commento
David Goodmanson
David Goodmanson il 17 Mag 2019
Hi Or,
If you are doing this numerically, as you probably already know, N = [1 2 3] creates a row vector, N = [1; 2; 3] creates a column vector.
Dot and cross functions are available in Matlab, see 'doc dot' and 'doc cross'. The cross function outputs a column vector if both inputs are column vectors, and a row vector otherwise.

Accedi per commentare.

Risposta accettata

Jon Wieser
Jon Wieser il 16 Mag 2019
s2_hat= n1/n2*(N_hat*(-N_hat*s1_hat))-N_hat*sqrt(1-(n1/n2)^2*(N_hat*s1_hat)*(N_hat*s1_hat))

Più risposte (1)

Giuseppe
Giuseppe il 24 Apr 2024 alle 13:24
e^(-x^2)*sin(x)

Categorie

Scopri di più su Characters and Strings 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