1台のPCで2つのMatlabウィンドウを起動し、各ウィンドウでプログラムを同時に実行することは可能でしょうか。
Mostra commenti meno recenti
1台のPCで2つのMatlabウィンドウを起動し、各Matlabウィンドウでプログラムを同時に実行することは可能でしょうか。
計算時間を短縮するために並列計算を行いたいのですが、Parallel Computing Toolboxをすぐに導入出来そうになく、質問をさせていただいた次第です。
具体的には、1時間毎のデータが数年分ありまして、時間毎のデータを読み込んだあと、1日毎にデータ処理をしております。
日を跨いでのデータのやり取りはありません。
そのため、例えば2つMatlabを起動した上で、片方のウィンドウで2020~2021年を計算し、もう一方のウィンドウで2022~2023年を計算すると同時実行が出来そうに思うのですが、変数名が同じだと干渉してしまう可能性があるのでしょうか。
for year=First_year: Last_year
for month=First_month: Last_month
for day=First_day:Last_day
for hour=0:23
%一日ごとのデータ処理
end %hour
end %day
end %month
end %year
1 Commento
Dyuman Joshi
il 15 Feb 2024
Yes, you can run 2 instances of MATLAB on the same PC. But both instances will require RAM separetely.
It will be better to run your code as function. And as functions have their own workspaces, there will be no interference of variables.
You could also run your code through profiler to see if there are any bottlenecks in your code.
Also, see if you can vectorize any operations, that will improve the performance of your code.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Whos in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!