how to plot individual particle velocites in a closed space

조회 수: 4 (최근 30일)
bharathi Dasari
bharathi Dasari 2019년 10월 16일
답변: darova 2019년 10월 16일
i had some spherical particles which will be moving with time i had the velocity data but to plot contour i need to assign to grid how to do this
  댓글 수: 6
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 10월 16일
Describe your data: which column is what and which column is your time//velocity//coordinates, etc or you have formulation to compute your velocity from your atatched data?
bharathi Dasari
bharathi Dasari 2019년 10월 16일
xx,yy are x and y locations and at the starting real time tells at what time step we are ,velocity components is not there in that data. i dont have any

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

채택된 답변

darova
darova 2019년 10월 16일
Here is what i invented
clc,clear
A = readtable('ploc.txt');
A1 = A;
k = 1;
for i = 0:10
ii = (1:561) + 561*i;
A1(ii,:) = A(ii+k,:); % read only with numbers
k = k + 2;
end
A2 = table2array(A1); % convert table to array
A3 = zeros(length(A2),5);
for i = 1:length(A2)
A3(i,:) = str2num(A2{i}); % convert cell/str to number
end
cla
hold on
for i = 0:10
ii = (1:561) +i*561;
x = A3(ii,2);
y = A3(ii,3);
plot(x,y,'.r') % draw particles
pause(0.5)
end
hold off

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by