How can I plot the change in concentration of a 3-D figure ( a drug patch) over time in a (4-D)
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have gathered data from a number of files into a 3-D array A(number of files(or the processor that solved ), Time steps- 80000, Z direction steps per timestep-6). I have actually simplified the calculations by assuming that the concentration points at each z step are equal to y and x. I was thinking of adding an x and y dimension in and combine it with the A array, somehow getting rid of the 1st dimension (number of files). A(timesteps,z,x,y)
That is the array which I would like to plot as it will be the size of (80000*(6*20files)120*120). These will only have concentration values at those points, so how would I be able to plot it over an XYZ coordinate system?
This is what I have for my code so far:
numprocs = 20;
textFilename = cell(1,numprocs);
id = cell(1,numprocs);
tN = 80002;
N = 120;
N2 = N/numprocs + 2;
S= N2 - 2;
A=zeros(numprocs,tN,N/numprocs);
formatSpec = '%f';
for k = 1
textFileName = fullfile('C:\Users\Timmmmeh\Desktop\Project Data',['Processor' num2str(k) '.txt']);
fid = fopen(textFileName, 'r');
q = fid;
m = 0;
w = 0;
for ms = 1:80000
m = m+1;
w = w+1;
textData = textscan(fid,formatSpec, S);
if (isempty(textData{1,1})~= 1)
for j = 1:S
A(k,m,j) = textData{1,1}(j,1);
end
end
end
fclose(fid);
end
dx = 6.35/120;
dy = 5.08/120;
for i = 1:121
xp(i) = dx*(i-1);
yp(i) = dy*(i-1);
end
2 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Graphics Performance in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!