Subscripted assignment dimension mismatch.

i'm trying to write this system:
a=1.07;
b=0.3;
k=2;
x1=[];
x2=[];
x3=[];
x=[];
f(x)=[1-a*((x1)^2)*(k) ; 0 ;0 ];
A=[0 1 0;0.3 0 1;-0.3 0 0];
x=[x1 ; x2 ; x3 ];
k=lenght(x);
x(k+1)= Ax(k)+f(x(k));
figure;
plot(x,k)

Respuestas (1)

Caglar
Caglar el 4 de Nov. de 2018
First of all, f(x) is wrong.
x=[];
f(x)=[1-a*((x1)^2)*(k) ; 0 ;0 ];
x is empty, how can it be an indice? And then, your calculation (right hand side) yields 2-d data. Left side must comply.
x=[1];
f(x,:)=[1-a*((x1)^2)*(k) ; 0 ;0 ];

3 comentarios

sihem bk
sihem bk el 4 de Nov. de 2018
thank you for the first;i put x empty because when i execute the code withn puting the type of x i get error . but really i don't know how to declare x
Caglar
Caglar el 4 de Nov. de 2018
can you write what is your final goal? As @star strider said its not clear.
sihem bk
sihem bk el 4 de Nov. de 2018
Editada: sihem bk el 4 de Nov. de 2018
mmy goal is to plot this :
and i'm starting from this

La pregunta está cerrada.

Productos

Etiquetas

Preguntada:

el 4 de Nov. de 2018

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by