Info
This question is closed. Reopen it to edit or answer.
good mornning please i have an error in this programm , can any one help me please i need that urgent
2 views (last 30 days)
Show older comments
v4=[];
for j=0:1:63
for h=0:0.1:3
pnd=0:0.1:1 ;
n=2:2:16;
% if(n>=2)
v4=[v4;sum((sum( pnnd(j))) ,h)+n]
end
end
#
this is the error msg :
#
Error in ==> Ency at 9
v4=[v4;sum((sum( pnnd(j))) ,h)+n]
#
[EDITED, Jan, Code formatted]
6 Comments
Answers (2)
Image Analyst
on 28 Apr 2015
sum() does not take a second argument that is 0 or a fraction like 0, .1, .2, .3, etc. Why are you passing h into sum()? And why are you summing a single number like pnnd(j)? The sum of that is simply its value, pnnd(j).
6 Comments
Image Analyst
on 28 Apr 2015
pnnd has only 12 elements. So why are you trying to access the 13th element? Plus, like I've already said, that h won't work. sum() will not take an input of 1.1 for the dimension that you want to sum along.
Image Analyst
on 28 Apr 2015
You don't start arrays with an index of 0. They start with 1 in MATLAB.
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!