日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 人文社科 > 生活经验 >内容正文

生活经验

MATLAB【五】———— matlab 调用C++生成exe文件,高斯核函数

發(fā)布時(shí)間:2023/11/27 生活经验 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MATLAB【五】———— matlab 调用C++生成exe文件,高斯核函数 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

?兩種方式調(diào)用C++生成的exe文件,

語(yǔ)法:

status = system(command)

[status,cmdout] = system(command)

[status,cmdout] = system(command,'-echo')

說(shuō)明

status?= system(command)?調(diào)用操作系統(tǒng)執(zhí)行指定的命令。操作會(huì)等待命令執(zhí)行完畢,然后再將命令的退出狀態(tài)返回到?status?變量。

該函數(shù)將啟動(dòng)新的 cmd/shell 進(jìn)程、執(zhí)行?command、退出進(jìn)程,然后返回到 MATLAB??進(jìn)程command?對(duì)系統(tǒng)環(huán)境所做的更新對(duì) MATLAB 不可見(jiàn)。

示例

[status,cmdout] = system(command)?還會(huì)將命令的輸出返回到?cmdout。該語(yǔ)法對(duì)不需要用戶輸入的命令最有用,例如?dir

[status,cmdout] = system(command,'-echo')?還在 MATLAB 命令行窗口中顯示(回顯)命令輸出。該語(yǔ)法對(duì)需要用戶輸入并在 MATLAB 命令行窗口中正確運(yùn)行的命令最有用。

ExeFileName='generate_reference_data.exe';
exePath = 'D:\softinstall\msys2\home\Administrator\workplacwe\build\bin\RelWithDebInfo\';
ExeFilePath=fullfile(exePath,ExeFileName);
Param1=[' ','D:\matlab\vescl\gauss\0.png'];%第一個(gè)參數(shù),一定要有' '
Param2=[' ','--config D:\matlab\vescl\gauss\vcsel_config(single_plane)'];
Cmd=[ExeFilePath ,Param1 ,Param2];
[status, results]=system('command','-echo');
%%%[status,result] = system(['D:\softinstall\msys2\home\Administrator\workplacwe\build\bin\RelWithDebInfo\generate_reference_data.exe "D:\matlab\vescl\gauss\0.png" --config "D:\matlab\vescl\gauss\vcsel_config(single_plane)"'],'-echo') ;
[status,result] = system(['D:\coding\save_matching_info\Multiple_reference_plane0221\RelWithDebInfo\depth_magic_runner.exe   "Z:\junfeng\temprature_compensate_figures\fatman mini#25\data\',num2str(x(t),'%.0f'),'\.*.raw"     --config    "C:\Users\Administrator\Desktop\data\晚上\Thinmanmini#071#0420\Thinmanmini#071#0420"']) ;

高斯核函數(shù),實(shí)例?

% 
m=50;
n=2;
x=0:1:100;
y=exp(-(x-m).^2/(2*n^2));
subplot(2,1,1)
plot(x,y)
subplot(2,1,2)
z=normrnd(50,2,100,1);
plot(z)
z=0:1:100; 
d=normpdf(z,50,2); 
plot(z,d)

參考:https://ww2.mathworks.cn/help/matlab/ref/system.html

總結(jié)

以上是生活随笔為你收集整理的MATLAB【五】———— matlab 调用C++生成exe文件,高斯核函数的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。