How to enter a function into MATLAB
Mostra commenti meno recenti
Hello good day,
I am having issues on how to enter this equation into MATLAB.

I have it as
H/2 * cos(k*x)*cos(sigma*t)
but getting a different answer from my calculator
Thank you
Risposte (1)
Steven Lord
il 17 Set 2020
0 voti
Is your calculator computing the cosine of angles in degrees (which in MATLAB is the cosd function) or in radians (cos)?
2 Commenti
Nicholas Deosaran
il 17 Set 2020
Walter Roberson
il 17 Set 2020
If your inputs are all scalars then you can use either * or .*
If your inputs are not scalars, then you need .*
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!