Need to return a column vector?

1 visualización (últimos 30 días)
Andrew Davies
Andrew Davies el 19 de Mayo de 2014
Respondida: Image Analyst el 19 de Mayo de 2014
function dLdt = Lorentz(t,xyz)
x=xyz(1);
y=xyz(2);
z=xyz(3);
s = 10;
b = 8/3;
r = 0.5;
dx = s*(y - x)
dy = r*x - y - x*z
dz = x*y - b*z
dLdt = zeros(3,2,1);
dLdt(1)=dx;
dLdt(2)=dy;
dLdt(3)=dz;
I then tried calling this in another script and it said it needs to return a column vector?

Respuestas (1)

Image Analyst
Image Analyst el 19 de Mayo de 2014
Then, I assume xyz is a M by 3 array of coordinates, so you need to do
x = xyz(:,1);
y = xyz(:,2);
z = xyz(:,3);

Categorías

Más información sobre Point Cloud Processing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by