why my Matlab calculate a simple code so solw?

2 ビュー (過去 30 日間)
擎 蒋
擎 蒋 2020 年 12 月 20 日
編集済み: Asad (Mehrzad) Khoddam 2020 年 12 月 23 日
my laptop is Alienware m15 which has qualified configuration for Matlab. But after i install it, i tried a simple code such as "1+1", it ran 4min before giving the answer. I can't figure out what is wrong. Or is it a normal situation?
  4 件のコメント
J. Alex Lee
J. Alex Lee 2020 年 12 月 21 日
is your current working dir a network location? i have noticed some slow down (though not that extreme) when i'm working from a network location, even when the operations don't involve any file i/o.
Madhav Thakker
Madhav Thakker 2020 年 12 月 23 日
Which operating system and MATLAB version are you using?

サインインしてコメントする。

回答 (1 件)

Asad (Mehrzad) Khoddam
Asad (Mehrzad) Khoddam 2020 年 12 月 23 日
編集済み: Asad (Mehrzad) Khoddam 2020 年 12 月 23 日
When you use this command:
two = 1 + 1
The program should display the results and it takes time to transfer data to graphic cards.
Morever, for timinh, it is better to do the operation for many time (1000 or more) and take the average.
change the code to this:
tic;two=1+1;toc
or in a loop
tic;
for i=1:1000;
two=1+1;
end;
toc

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by