why my Matlab calculate a simple code so solw?

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

Jan
Jan 2020년 12월 20일
Which operating system and Matlab version are you using?
On my very old home computer:
tic
two = 1 + 1
toc
Elapsed time is 0.000223 seconds.
Are you sure there weren't some background tasks running (control-shift-esc in Windows to see them) and that MATLAB was fully launched (like it was sitting idle for a minute or two)?
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.
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일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

2020년 12월 20일

편집:

2020년 12월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by