【发布时间】:2019-08-12 16:17:44
【问题描述】:
简而言之,我是 Juypter Notebook 和 Octave 的新手。我的程序是从八度加载 pkgs 来执行操作。我已经在线观看了一些视频,但传奇没有显示如何...我在 Octave 中编写了这个程序,它就像 Jupyter 笔记本的注释部分一样工作。我在 Octave 中下载了软件包。
pkg load io; pkg load dataframe ; pkg load ltfat;
run 'C:\Octave\absorbancegraph.m' % The necessary functions
run 'C:\Octave\ngraph.m' % The necessary functions
excel_file = 'C:\College\MasterFileLactose071019TDS.xlsx';
sheet_name1 = 'Lactose.500g.2p'; sheet_name2 = 'Lactose.425g.2p';
sheet_name3 = 'Lactose.375g.2p'; sheet_name4 = 'Lactose.450g.2p';
sheet_name5 = 'Serra93.4muNN1';
[absorbance1, thz] = absorbancegraph(excel_file,sheet_name1);
[absorbance2, thz] = absorbancegraph(excel_file,sheet_name2);
[absorbance3, thz] = absorbancegraph(excel_file,sheet_name3);
[absorbance4, thz] = absorbancegraph(excel_file,sheet_name4);
[refractive_index1, thz] = ngraph(excel_file,sheet_name1);
[refractive_index2, thz] = ngraph(excel_file, sheet_name2);
[refractive_index3, thz] = ngraph(excel_file, sheet_name3);
[refractive_index4, thz] = ngraph(excel_file, sheet_name4);
[refractive_index5, thz] = ngraph(excel_file, sheet_name5);
figure(1)
set(gcf,'units','normalized','position',[0.03 0.50 0.43 0.35]);
plot(thz,absorbance1, 'k');hold on; plot(thz, absorbance2, 'r');
hold on; plot(thz,absorbance3,'g'); hold on; plot(thz, absorbance4, 'm');
axis ("normal"); xax1 = 'TeraHertz (THz)' ; yax1 = 'Absorbance';
xlim([0 3]); grid on;
xlabel(xax1); ylabel(yax1); title( strcat(yax1, ' of various Lactose Tablets' ));
legend(sheet_name1,sheet_name2, sheet_name3, sheet_name4)
set(gca);
box on
figure(2)
set(gcf,'units','normalized','position',[0.03 0.50 0.43 0.35]);
plot(thz,refractive_index1, 'k'); hold on; plot(thz, refractive_index2, 'r');
hold on; plot(thz, refractive_index3, 'g'); hold on; plot(thz, refractive_index4, 'm');
axis ("normal"); xax1 = 'TeraHertz (THz)' ; yax1 = 'Refractive Index';
xlim([0 3]); ylim([-10 10]); grid on;
xlabel(xax1); ylabel(yax1); title( strcat(yax1, ' of various Lactose, Tablets'))
legend(sheet_name1, sheet_name2, sheet_name3, sheet_name4);
set(gca);
box on
figure(3)
set(gcf,'units','normalized','position',[0.03 0.50 0.43 0.35]);
plot(thz,refractive_index5, 'k');
axis ("normal"); xax1 = 'TeraHertz (THz)' ; yax1 = 'Refractive Index';
xlim([0 3]); ylim([0 4]); grid on;
xlabel(xax1); ylabel(yax1); title( strcat(yax1, ' of various NanoCelluose'))
legend(sheet_name5);
set(gca);
box on
错误信息如下
'unzip' 未被识别为内部或外部命令, 可运行的程序或批处理文件。
我在 Octave 中运行这段代码,它运行良好;但是,我也想知道如何切换内核以使用octave-gui.exe,而不是octave-cli.exe.
【问题讨论】: