How to get the length of flame front
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
LEONG SING YEW
el 13 de Mzo. de 2020
Editada: LEONG SING YEW
el 21 de Mzo. de 2020
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277073/image.png)
Hi everyone, does anyone know how to code for measuring the length of flame front as seen in the picture above?
My lecturer suggest to me use everyone point (x,y) of the respective temperature to calculate the distance, i'm very new to coding, i appreaciate any help
Here is my csv attachments and matlab code for this 2D surf contour plot
filename = '40um.csv';
Data = csvread(filename,6,0); %read csv data
X_Data = Data(:,2);
Y_Data = Data(:,1);
T_Data = Data(:,6);
T_Data(T_Data>400)=300; %more than 400K equal to 300
[x,~,xi]=unique(X_Data*1e3/2); %convert m to mm
[y,~,yi]=unique(Y_Data*1e3/2); %option: divide by 2 to use for validations
subs=[xi yi];%use the indices instead of values as coordinates
[X,Y]=ndgrid(x,y);%generate the grid surf() expects
val=T_Data;
M=accumarray(subs,val,[],[],NaN);%fill missing with NaN
surf(X,Y,M);
surf(-X,Y,M); %Reflection along y-axis
colormap jet
view(0,90),xlabel("x/R (mm)"+newline),ylabel("y/R (mm)"+newline)
xlim([-2 2]); ylim([-0.5 3.4]); c=colorbar;
title(c,"Temperature",'FontSize',9,'FontWeight','bold'); title('0\circ');
shading interp
Respuesta aceptada
darova
el 14 de Mzo. de 2020
You have to find first value in each column
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277125/image.png)
ii = zeros(columns,1)
jj = 1:columns;
for j = 1:columns
ii(j) = find(M(:,j)>200,1,'last');
end
L = hypot(diff(jj),diff(ii));
1 comentario
LEONG SING YEW
el 21 de Mzo. de 2020
Editada: LEONG SING YEW
el 21 de Mzo. de 2020
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Preprocessing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!