How to do the following matrix multiplication and division?

1 回表示 (過去 30 日間)
Ahmed Razeen
Ahmed Razeen 2020 年 8 月 12 日
コメント済み: jessupj 2020 年 8 月 12 日
I have Frequency as a 22x1 column vector, and the following equation must produce 22x1 column vector [all other variables are scalars]
Lorentz_Imaginary_conductivity = DC_Conductivity * ((time * Frequency .* (1 - Oscillator_frequency^2 / Frequency.^2)) ...
./ (1 + (time .* Frequency .* (1 - Oscillator_frequency^2 ./ Frequency.^2)).^2));
But instead it gives 22x22 matrix. What is the problem here?

採用された回答

jessupj
jessupj 2020 年 8 月 12 日
(1 - Oscillator_frequency^2 / Frequency.^2))
this slash needs to be a './' or it's interpreted as a matrix inverison... htat's where your 22x22 is coming from
  3 件のコメント
Ahmed Razeen
Ahmed Razeen 2020 年 8 月 12 日
Yea, That worked. Thank you very much
jessupj
jessupj 2020 年 8 月 12 日
my bad for being sloppy. this is not technically a matrix inversion of course. most control/inverse problem folks that i know conisider 'scalar divided by a vector' an inverison (e.g. of a moment), at least conceputally.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by