Effacer les filtres
Effacer les filtres

How to divide and times in matlab

346 vues (au cours des 30 derniers jours)
u-will-neva-no le 11 Déc 2011
Hey everyone!
Basically im trying to write my fist line of code, in matlab, to the given formula: |G(jw) |= 1/√(R^2+(wL- 1/wC)^2 ) Now, im not sure how to get the 1/wC term as I do not know how to divide in matlab. also, how do I get the ^2? All I want is the general form as an answer. I should be able to get it from there! Thanks!

Réponse acceptée

bym le 11 Déc 2011
* % matrix multiply
.* %scalar multiply
/ % matrix divide
./ % scalar divide
^ % exponentiation
.^ % element-by-element exponentiation
so for your equation:

Plus de réponses (4)

Paulo Silva
Paulo Silva le 11 Déc 2011
if perhaps you are working with arrays or vectors and you want the operations to be performed element wise you must put a period before the symbols like this:

u-will-neva-no le 12 Déc 2011

Samra Sarwar
Samra Sarwar le 4 Déc 2019
L = 2500
wi = 15
τ = L/wi
Please code this in MATLAB

Zahin Akif
Zahin Akif le 19 Fév 2020
L = 2500
wi = 15
τ = L/wi


En savoir plus sur Logical 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!

Translated by