no gui result different from gui
2 次查看(过去 30 天)
显示 更早的评论
I run matlab 2018a on ubuntu 16.04.
When I open gui and run the code, I got result 0.86
When I use no gui
screen
matlab -nodisplay -nodesktop -nosplash <t2_esc.m> t2_esc.txt &
screen -d
I got result 0.93
That is exactly the same code. Does anyone know why?
By the way, specific random seed, rng(0)
2 个评论
Kevin Chng
2018-12-17
I just wondered, will the value of t2_esc.txt considered as char put into your function t2_esc.m?
回答(1 个)
Jan
2018-12-17
There is no magic flag for changing the results if Matlab is called without GUI. Therefore you can be sure that you instruct Matlab to calculate something different. Perhaps you have two different files called t2_esc.m, so if Matlab starts without GUI you are in a different folder and process another file. Or the calculations include a dependency to the settings of the GUI. Without seeing the code it is impossible to guess the reasons.
Do these two calls reply the same results?
matlab -nodisplay -nodesktop -nosplash <t2_esc.m> t2_esc_a.txt &
matlab <t2_esc.m> t2_esc_b.txt &
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!