how to read each text file using stread command
古いコメントを表示
hello dear
I want to read text file of ground motion displacemet data (44 files) but only show the last file GM44
clear all; close all; clc;
Sdir='C:\users\USER\Desktop\MCE'; %C:\users\USER\Desktop\MCE
Model='SMRF10';
Odir = strcat(Sdir,'\',Model,'\'); %C:\users\USER\Desktop\MCE\SMRF10
for X =[1:44]
if X<10
Tag_GM =strcat('GM0', int2str(X))
else
Tag_GM =strcat('GM', int2str(X))
end
fid=fopen(strcat(Odir,Tag_GM,'\',Model,'-',Tag_GM,'-StoryDispl.out'),'r'); %C:\users\USER\Desktop\MCE\SMRF10\PushOver_StoryDispl
StoryDisp=fscanf(fid,'%c',[12,inf]);
fclose(fid);
SDisp = strread(StoryDisp);
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!