Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

First Button Callback takes really long

조회 수: 1 (최근 30일)
Jan Majewski
Jan Majewski 2018년 12월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
I have designed a GUI as a Matlab Skript and after Running the Skript the first button callback i use takes a really long time to execute (A few minutes even!). After that any button callback starts instantly. I searched for this problem but couldnt really find any solutions.
Does anyone know, why this happens?
  댓글 수: 2
Mark Sherstan
Mark Sherstan 2018년 12월 17일
Also run your code through the profiler and post the results to your question and we will see if we can pinpoint whats taking so long to execute (please only post results that are taking a significant amount of time, something using ~2% of computation is not worth optimizing).
Jan Majewski
Jan Majewski 2018년 12월 17일
Since it only happenend when first using the button callback i thought it had nothing to with my code (silly me).
I repeatedly checked variables using the matfile command which is really slow.
The solution was to assign the .mat file to a struct and use this struct as input argument for the function checking the variables.
Thanks for your help and sorry for the badly written question.

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by