input arguments must be scalar matlab error
12 views (last 30 days)
Show older comments
I have written a code in it is telling above error in part mentioned below
NB=max(size(Y));
H=zeros(2:NB,2:NB);
N=zeros(NG+1:NB,NG+1:NB);
L=zeros(2:NB,NG+1:NB);
M=zeros(NG+1:NB,2:NB);
Plz. reply fast
2 Comments
Answers (1)
Guillaume
on 4 Mar 2015
doc zeros
And look at the examples
6 Comments
Temesgen Gelaw
on 27 Apr 2016
Moved: DGM
on 14 Feb 2023
Instead of H=zeros(2:NB,2:NB) use H=zeros([2:NB 2:NB])
Walter Roberson
on 28 Apr 2016
Moved: DGM
on 14 Feb 2023
No, it would be either
H = zeros(NB, NB);
or
H = zeros(NB-2+1, NB-2+1);
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!