How to pass a double value by reference

4 ビュー (過去 30 日間)
Cordell Smith
Cordell Smith 2018 年 6 月 21 日
コメント済み: dpb 2018 年 6 月 22 日
We are using a COM Function that takes output doubles as an argument. When I tried to pass regular Matlab double values, I get this error.
Error using COM.Afgrow_Application/invoke
Error: Type mismatch, argument 1
I think this is because the type of the variable is “ out double ” Which is passed by reference.
%This Line Launches the afgrow application
afgrow = actxserver('Afgrow.Application');
%Set Units to English, 1 for metric
set(afgrow, 'Units', 0);
%Sets Spectrum to Constant Amplitude
invoke(afgrow, 'ConstAmplitudeSpectrum', 0)
%Set Multiplication Factor to 13.5
set(afgrow, 'SMF', 13.5);
%Set Initial Crack Length in C Direction to .05
set(afgrow, 'Visible', 1);
%invoke(afgrow, 'RunFrozPredict', cyc)
invoke(afgrow,'model',1030);
le=cell(2,2);
le=[0.05,0.05;0.05,0.05];
cyc = 0;
fc = 0;
fkc = 0;
fa =0;
fka = 0;
fct =0;
fkct =0;
invoke(afgrow, 'RunFrozPredict',cyc, fc, fkc, fa, fka, fct,fkc);
invoke(afgrow, 'CalculateBetas',le)
invoke(afgrow, 'RunPredict')
  2 件のコメント
Walter Roberson
Walter Roberson 2018 年 6 月 21 日
dpb
dpb 2018 年 6 月 22 日
Maybe the following can help??? Answers94888

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeUse COM Objects in MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by