필터 지우기
필터 지우기

How to run MATLAB file for ( different text files and different Long) at the same time to run all of them?

조회 수: 2 (최근 30일)
I have a MATLAB Code for different profiles but same code working for all profiles. Each profile has its text file and length of the profile which is long in MATLAB. for each profile, I have to change text file and long of the profile. Could you please let me know how to run all profiles to select the text file and its length at the same time (automatically)? but the length is not defined in MATLAB for each profile I change for each profile.
In the output, I have three different jpg files results for each text file and I would like to have different names of the jpg files.
Then, I want to each jpg file show me the different title inside top of the image.
Anyone can help, please ?
Thank you

답변 (1개)

Harry Vancao
Harry Vancao 2018년 11월 9일
편집: Harry Vancao 2018년 11월 9일
It looks like you are interested in using the parallel computing toolbox to perform the same processing on separate text files in parallel. If you have the parallel computing toolbox, then you may find that the "spmd" block will be very useful.
spmd
for i = labindex:numlabs:numTextFiles
% open text file i and perform processing
end
end
Doing this will allow you to have a fixed number of workers. However, they can evenly distribute the work across the different text files.
  댓글 수: 3
Harry Vancao
Harry Vancao 2018년 11월 12일
Can you provide more details on what doesnt work? Do you see an error, is there something happening that you dont expect?
Mezgeen Rasol
Mezgeen Rasol 2018년 11월 16일
I mean how to arrange with my code where to put ? for example I have my code 100 rows ? then how to arrange it. Thanks

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by