How to enter a function into MATLAB
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (1)
Steven Lord
le 17 Sep 2020
Is your calculator computing the cosine of angles in degrees (which in MATLAB is the cosd function) or in radians (cos)?
2 commentaires
Walter Roberson
le 17 Sep 2020
If your inputs are all scalars then you can use either * or .*
If your inputs are not scalars, then you need .*
Voir également
Catégories
En savoir plus sur Timing and presenting 2D and 3D stimuli dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!