Need to return a column vector?
조회 수: 3 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (1개)
Image Analyst
2014년 5월 19일
Please read this: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
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);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Point Cloud Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!