One dimensional array printing strangely

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

One dimensional array printing strangely

sdorsher
Hello,

I am using software someone else has written. Because of that, I can’t cite specific code. However, when trying to modify and debug it, I am running into problems of the form

size(y)= (3,1)

And then I print y and it displays two elements.

Has anyone seen this before?

Thanks,
Steven
_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: One dimensional array printing strangely

Svetlana A. Tkachenko
> > size(y)= (3,1)
>
> And then I print y and it displays two elements.

For me this is not enough information to explain what is happening.

You could simplify your code by removing any irrelevant case until a
reduced version, a test case, is available.

Orr add a breakpoint somewhere where y is still ok (failing that, where
y is not yet defined) and then walk in the code one line at a time. More
details about this is available at
https://www.gnu.org/software/octave/doc/v4.0.1/Debugging.html .

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave