std function error "Subscript indices must either be real positive integers or logicals."
4 views (last 30 days)
Pardon my stupidity but I really dont understand why matlab refuses to compute the standard deviation.
I checked the data: 355 X 1 double (no NaN inside or whatever). I can compute the mean, sum, median, of this exact same data but I receive an error when I want to do the std ...
I tried the following: A=[1 2 3 1 2 3]';
B=std(A) New error: Index exceeds matrix dimensions.
But if I do it on a brand new script, it works !!
Can anyone tell my what the hell is happening there ?
Thank you so much in advance !
Chandani Madnani on 26 Feb 2018
Edited: Chandani Madnani on 26 Feb 2018
I tried to reproduce the scenario by executing the below commands:
>> A=[1 2 3 1 2 3]';
But I get a response:
Which version of MATLAB are you using and on which platform ? Is A initialized to something else in between the two commands ?