필터 지우기
필터 지우기

Subscript indices must either be real positive integers or logicals.

조회 수: 2 (최근 30일)
Aaina
Aaina 2019년 2월 28일
편집: Ali H. Mohammed 2019년 9월 13일
Hai,
May i ask what is actually means when I run the program and I got this msg
Subscript indices must either be real positive integers or logicals.
Error in ext2int (line 149)
brs = ( mpc.branch(:, BR_STATUS) & ... %% branch status
Error in runpf (line 111)
mpc = ext2int(mpc);
Error in BPSO69 (line 12)
loadflow=runpf(data1);
>>
  댓글 수: 1
Aaina
Aaina 2019년 2월 28일
the mpc.branch for this file is:
%% branch data
% fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax
mpc.branch = [
1 2 0.00003120 0.00007487 0.00000000 999 999 999 0 0 1 -360 360
2 3 0.00003120 0.00007487 0.00000000 999 999 999 0 0 1 -360 360
3 4 0.00009359 0.00022461 0.00000000 999 999 999 0 0 1 -360 360

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2019년 2월 28일
YOu are giving negative or zero index to extract a element from matrix.
A = rand(10) ;
A(1,1) % no error
A(10) % no error
A(0) % error
A(-1) % error
A(0.5) % error
Read about MATLAB matri xindexing. Note that MATLAB indces start from 1 and they are positive integers
  댓글 수: 1
Aaina
Aaina 2019년 3월 1일
Thak you so much for your comment.
Actually I tried to access the matrix which not exist. Therefore, it was error.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Ali H. Mohammed
Ali H. Mohammed 2019년 9월 13일
편집: Ali H. Mohammed 2019년 9월 13일
Hi everyone
Same problem with me, can you share the solution with me?? please

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by