Error using *: Inner matrix dimensions must agree.
古いコメントを表示
Can someone please tell me why I am getting an error on the below code?
samplelength = length(s1);
n_harm = (0:5);
TimePeriod = SinglePeriod;
T_samples = SinglePeriod(2) - SinglePeriod(1);
fT = samplelength * T_samples;
f0 = 1/fT;
omega_t = 2*pi*n_harm*f0*TimePeriod;
omega_t2 = 2*pi*n_harm*f0*t;
The error I get is
Error using *
Inner matrix dimensions must agree.
Error in mission (line 109)
omega_t = 2*pi*n_harm*f0*TimePeriod;
回答 (1 件)
madhan ravi
2020 年 8 月 27 日
0 投票
Use .*
2 件のコメント
Yasmine Sellwood
2020 年 8 月 27 日
編集済み: Yasmine Sellwood
2020 年 8 月 27 日
madhan ravi
2020 年 8 月 27 日
omega_t = 2*pi*n_harm*f0.*TimePeriod(:);
カテゴリ
ヘルプ センター および File Exchange で Stability Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!