Extracting data from a text for further analysis
이전 댓글 표시
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%');
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Color and Styling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!