MATLAB Answers

Subscript indices must either be real positive integers or logicals.

1 view (last 30 days)
Mo Das
Mo Das on 3 Jun 2019
Commented: Mo Das on 3 Jun 2019
hi friends. i have this code . when i execute first or second part in seprate script , it works and gives me answer . but when i execute both of them in one script and after each other it shows me that error .
*Subscript indices must either be real positive integers or logicals.
what should i do?
PVbi = BAC .* PCBreakEven ; %part 1
PVbiSum = [sum(PVbi(2:end,1:numel(duration)))];
EV = BAC .* PC ; % part2
SigmaEV = [sum(EV(2:end,1:4)) ;sum(EV(2:end,5:8)) ;
sum(EV(2:end,9:12)) ;sum(EV(2:end,13:16)) ;
sum(EV(2:end,17:20)) ;sum(EV(2:end,21:24))];
  6 Comments

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!