フィルターのクリア

My code continuously giving this error( Error using ./ Matrix dimensions must agree .Error in Untitled14 (line 16) r=w./wd; and the size of w is 60x1 double size of wd is 60x60 double

1 回表示 (過去 30 日間)
filename = 'datacollect2.xlsx'; num = xlsread(filename,'B1:B60'); w = num/60; N = length(num); t = 1/w; s = xlsread(filename,'B3:B3'); xt= s; g = 1/N; i = xt + num; h = xt/ i ; ln=@log; q=ln(h); zeta = g * q; j= 1-power(zeta,2); wd = w*power(j,1/2); r=w./wd; k = zeta*r; l=k*sin(wd*t); m=cos(wdt) + l; n= - zeta*w*t; p = 1 - exp(n)*(m); plot (p)

採用された回答

Star Strider
Star Strider 2017 年 6 月 12 日
Try this:
r = bsxfun(@rdivide, w, wd);
  1 件のコメント
Star Strider
Star Strider 2017 年 6 月 14 日
To calculate ‘m=cos(wd) + u;’, use bsxfun again:
m = bsxfun(@plus, cos(wd), u);
You have not stated what size ‘u’ is, so I assume it is a (60x1) vector.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by