資源簡介
繪制曲線,利用matlab 經典教程不錯阿偶
代碼片段和文件信息
%生成應力-應變曲線,應力-時間曲線
%第一列為時間,第二列為應變,第三列為應力。
clear;clc;
[filenamefilepath]=uigetfile(‘.txt‘‘Select?stress-strain?data‘);
file=[filepath?filename];
fid=fopen(file‘rt‘);
if?fid?==-1
???errordlg(?‘Error?opening?the?file‘‘error?information‘);
end
%%%%%%%?read?column?headers
%C_text?=?textscan(fid‘%s‘4‘delimiter‘‘?|‘);
%%%%%%%%?read?numeric?data
%C_data0?=?textscan(fid?‘%f?%f?%f
評論
共有 條評論