Call a MATLAB function from .NET program

2 ビュー (過去 30 日間)
Naveen Tatineni
Naveen Tatineni 2022 年 1 月 12 日
回答済み: Sean de Wolski 2022 年 1 月 12 日
I'm trying to call a MATLAB function like below from .NET program.
function run_program(id, varargin)
Currently I'm just passing id parameter from .net code and I was able to call the matlab function and its is working fine.
Now I want to pass some more parameters through 'varargin' array from .net.
On MATLAB side, the code for 'varargin' params is below
function [db, conn1] = get_db(val_id, varargin)
p = BaseClass.parse_def;
addRequired(p, 'val_id', @ischar);
addParameter(p, 'db_id', 'XXXXX', @ischar);
addParameter(p, 'db_name', 'XXXXX', @ischar);
addParameter(p, 'user_id', 'XXXXX', @ischar);
addParameter(p, 'password', 'XXXXX', @ischar);
parse(p, val_id, varargin{:});
pin = p.Results;
Now how can pass parameters for db_id, db_name etc from .NET side as key value pairs?

回答 (1 件)

Sean de Wolski
Sean de Wolski 2022 年 1 月 12 日
https://www.mathworks.com/help/releases/R2021b/matlab/matlab_external/call-matlab-function-from-c-client.html

カテゴリ

Help Center および File ExchangeCall Web Services from MATLAB Using HTTP についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by