フィルターのクリア

Index in position 1 exceeds array bounds (must not exceed 1).

3 ビュー (過去 30 日間)
mukul anand
mukul anand 2019 年 8 月 27 日
コメント済み: mukul anand 2019 年 8 月 27 日
clear all;
clc;
YBUS
IP_DATA
e=busdata(:,3);
f= 0;
V=e+1i*f;
g=abs(ybus);
b=0;
y=g+1i*b;
J1=zeros(1,n);
for i=2:nbus
for k=2:nbus
if i==k
J1(i,i)=2*e(i)*g(i,i)+g(i,k)*e(k)-b(i,k)*f(k);
else
J1(i,k)= (e(i)*g(k,i))-(f(i)*b(i,k));
end
end
end
J1;
In J1 (i,k) eroor is coming...Please help asap...
  1 件のコメント
Jan
Jan 2019 年 8 月 27 日
Avoid "asap", because it is impolite to puish voluntary helpers.

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

採用された回答

Jan
Jan 2019 年 8 月 27 日
編集済み: Jan 2019 年 8 月 27 日
We cannot know, what YBUS and IP_DATA is. It is your turn to check, if the error message concerns the variable e, g or f. Do this using the debugger. Type this in the command window:
dbstop if error
Run your code again. When Matlab stops at the error use size() to check the sizes of the potentially concerned variables.
My guess: After
b=0;
the expression b(i,k) does not work for i or k > 1.
  1 件のコメント
mukul anand
mukul anand 2019 年 8 月 27 日
Thanks after removing b expression it is working.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime Series についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by