Extracting data from a text for further analysis
Mostrar comentarios más antiguos
Hi,
I am new to importing data from text files to MATLAB for data processing. I have experience doing this process from excel to MATLAB, however this seems a bit more tedius.
I have a text file which I need to extract the 1st line of numeral text (line 11) as the Y coordinate matrix, the second line of numerical text (line 12) as the X coordinate matrix and lines 3-7 (lines 13-17) as the Z coordinate Matrix. This data will then be plotted on a contour plot (code already completed and found below). I also need to extract the 1st line of text (line 3) to insert as the figure's title (a below).
Code:
%plotting MSI yacht 1
figure
contourf(N_X1,N_Y1,N_Z1,50,'edgecolor','none')
title(a);
colormap cool %map colour style
xlabel('Peak Period (t)');
ylabel('Heading (deg)');
c = colorbar('southoutside');
c.Label.String = ('MSI%');
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Color and Styling en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!