Matlab Crashes When Executing randperm Function

2 ビュー (過去 30 日間)
Michael Cappello
Michael Cappello 2024 年 2 月 17 日
編集済み: Torsten 2024 年 2 月 23 日
I am running Matlab 2013b.
I have a function that analyzes data. It runs correctly when executed within Jenkins running on Linux. The code takes about an hour to run.
When I run on my Windows PC in a Putty window connected to a Linux box Matlab crashes every time. It crashes when executing the line "var = randperm(N)", where N is a double with a value = 58. I stepped through the code manually and stopped at different points and typed "var = randperm(58)" without any problem. This problem was verified by a second engineer who had run across the same problem weeks before me.
I have no idea how to troubleshoot this problem.
Thanks in advance for any help.
Mike
  9 件のコメント
Michael Cappello
Michael Cappello 2024 年 2 月 23 日
Jeff, the following works fine
idx = 1:length(X);
Walter,
which -all randperm
yields the following
built-in (/apps/MATLAB/R2013b/toolbox/matlab/randfun/randperm)
/apps/MATLAB/R2013b/toolbox/matlab/randfun/@RandStream/randperm.mexa64 % RandStream method
/apps/MATLAB/R2013b/toolbox/matlab/randfun/@RandStream/randperm.m % RandStream method
David,
I agree with your use of size over length, but, this is code that has been developed over years that I am now making changes to. I always tread lightly when I am the new guy.
Thank you all for your time.
Torsten
Torsten 2024 年 2 月 23 日
編集済み: Torsten 2024 年 2 月 23 日
I don't know if this could be the reason, but I had a similar problem with "octave" under Windows 11.
Switching the default console to the “Windows Console Host” solved the problem:
But since you work under MATLAB 2013, you might have to have a much lower Windows version installed.

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

回答 (0 件)

カテゴリ

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

製品


リリース

R2013b

Community Treasure Hunt

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

Start Hunting!

Translated by