Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

I have a wblfit error

Asked by Adam

Adam (view profile)

on 7 Jun 2013


I have an error with my wblfit. I am applying it to some data and I get the error: "X must be a vector containing positive values." I know that the data is a vector (I checked with isvector) and that all the values are greater than zero (I searched for values less than or equal to zero and got none). Now I really don't understand this error.





Adam (view profile)


No products are associated with this question.

1 Answer

Answer by Tom Lane

Tom Lane (view profile)

on 9 Jun 2013
Accepted answer

Nor do I understand it. But if I look inside wblfit I see it displays an error message if either of these is true:

if ~isvector(x)
    % or
elseif any(x <= 0)

Can you double-check those conditions on your data?

1 Comment


Adam (view profile)

on 11 Jun 2013

Hi Tom,

Thanks. I noticed this too and did a quick check, but didn't get any zero values. However when I checked again there were indeed zeros in the data so problem solved.



Tom Lane

Tom Lane (view profile)

Contact us