在macOS上使用Octave运行脚本时出现分段错误

问题描述

在macOS上使用Octave 5.2.0运行脚本时出现分段错误。我的示例(可在octave范围内工作)或我运行脚本的方式有问题吗?还是macOS上Octave的错误

octave BlackBody.m 
fatal: caught signal Segmentation fault: 11 -- stopping myself...
[1]    95607 segmentation fault  octave BlackBody.m

示例:

% simple model of the black body using MATLAB/Octave/Freemat
wavelength = 0.01:0.01:5.0;     % microns sweep over a range of wavelengths
T = 5000;                       % temperature in kelvin
F = 3.742./ ((wavelength.^5).*(exp(1.439e4./(wavelength*T))-1)) ; % gives the result in W/m2/um x 1e8
plot(wavelength,F);
xlabel('wavelength (\mum)');       %  add axis labels and plot title
ylabel('spectral intensity (W/m^2/\mum) x 10^8');
title('Blackbody Radiation');
legend(sprintf('T = %.0f K',T));

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)