|
From: | James Sherman Jr. |
Subject: | Re: How to prevent "error: A(I, J) = X: X must be a scalar..." with working matlab code |
Date: | Tue, 31 Jul 2007 11:12:15 -0400 |
Hello!
I'm having troubles getting working matlab code to be run with octave. I
couldn't find an answer to my problem in the archive or the net although I'd
say it should be quite popular.
Anyway octave can't handel this:
u= linspace(0,1,P)
x1(:,1)= 0.5.*(u)-0.5
It complains:
error: A(I, J) = X: X must be a scalar or the number of elements in I must
error: match the number of rows in X and the number of elements in J must
error: match the number of columns in X
error: assignment failed, or no method for `<unknown type> = matrix'
If I do x1(1,:)= 0.5.*(u)-0.5 all is fine. Having to rewrite the matlab code
would be a pain. Is there an easier way to get it to work with octave?
Thanks for any answers.
Lynx
ps. I'm not in the list.
_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |