It would be helpful if you could post an example which runs with just
copy-paste into the REPL.

On Tue, 2015-03-10 at 10:55, Kacem HARIZ <[email protected]> wrote:
> I got stuck by an error in Julia! please I need help!
>
> *here is the code:*
>
>  
> *w=1;*
> *γ=0.01;*
> *f(x,y)= [y;-w^2*sin(x)-u*w^2*cos(x) -2γ*y];*
>
> *for i=1 : numberOfStates*
> *    x0=Sx[i+2];*
> *    y0=Sy[i+2];*
> *    for j=1:sizeU*
> *        u=U[i];*
> *        t,NX=ODE.ode45(f(x,y,u),[0,0.1],[x0,y0])*
> *    end*
> *end*
>
> with Sx and Sy two vectors of the same size, and U is a vector of size 
> sizeU.
>
> *and here is the error message:*
>
> mismatch in dimension 1
> while loading In[94], in expression starting on line 5
>
>  in cat at abstractarray.jl:631
>  in hcat at abstractarray.jl:671
>  in hvcat at abstractarray.jl:966
>  in f at In[90]:3
>  in oderkf at /home/juser/.julia/v0.3/ODE/src/ODE.jl:208
>  in ode45_dp at /home/juser/.julia/v0.3/ODE/src/ODE.jl:303
>  in anonymous at no file:10
>
>
> Best regards,
> Kacem

Reply via email to