[問題] .m轉至c++ lib mwArray指向c++ funtion的問題?已回收
使用版本: matlab 2009b
問題描述: 小弟想要使用fsolve
來幫助我解聯立非線性系統的問題
所以編輯這個檔案
fsolve.m
function [ output_args ] = fsolve(obj,x0 )
output_args = fsolve(obj,x0);
end
然後經過mcc的轉換成 c++ shared lib
轉換至 c++ function 如下
fsolve(int nargout, mwArray& output_args,
const mwArray& obj, const mwArray& x0)
假如根據原本在matlab使用
需要有一個相對對應的fun object fuction
來幫助iteration解決 非線性系統
但是 我不知道要怎麼樣
用 mwArray& 指向我所要做的obj funtion
在matlab 6.5裡面的math c++lib 有funtion as argument的做法
但是無奈的 6.5版 ,並沒有提供fsolve在c++的user interface Orz
不知道 是不是有大大可以幫小弟求解一下
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.207.216