Im trying to make a graph of the locations of particles as they change over time but whenever I use scatter it gives me the error X and Y must be vectors of the same length Im sure its something simple, im not that good at matlab

댓글 수: 4

KSSV
KSSV 2018년 5월 3일
Your Xx and Xy are matrices......you want to plot a surface? Or what you are expecting?
KSSV
KSSV 2018년 5월 3일
Dude..you need reconsider your code.......
fx = 6.*pi.*rho_f*v.*R.*(u-u_p);
u_p is of size 1600*1.
Stephen23
Stephen23 2019년 11월 15일
Original question by Joseph Stocken "I'm trying to make a graph of the location of a particle but it keeps giving me the error X and Y must be the same length":
Im trying to make a graph of the locations of particles as they change over time but whenever I use scatter it gives me the error X and Y must be vectors of the same length Im sure its something simple, im not that good at matlab
Képkivágás.PNG
Rena Berman
Rena Berman 2019년 12월 12일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

 채택된 답변

Yuvaraj Venkataswamy
Yuvaraj Venkataswamy 2018년 5월 3일

1 개 추천

In your code, X and Y are not vector. It is matrix with size 1600 x 7. You can use below comment.
if true
scatter(Xx(:,7),Xy(:,7))
end

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

질문:

2018년 5월 3일

댓글:

2019년 12월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by