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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

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

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

?兩種方式調用C++生成的exe文件,

語法:

status = system(command)

[status,cmdout] = system(command)

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

說明

status?= system(command)?調用操作系統執行指定的命令。操作會等待命令執行完畢,然后再將命令的退出狀態返回到?status?變量。

該函數將啟動新的 cmd/shell 進程、執行?command、退出進程,然后返回到 MATLAB??進程command?對系統環境所做的更新對 MATLAB 不可見。

示例

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

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

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'];%第一個參數,一定要有' '
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"']) ;

高斯核函數,實例?

% 
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

總結

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

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。