Using mathcad from matlab
이전 댓글 표시
Hello guys,
I am trying to run a script from mathcad from the matlab.
In my script I have few variables that I change in every time I call the script, and I have 2 outputs I wish to save into matlab.
I use this code for it:
h = actxserver('Mathcad.Application');
sht = h.worksheet.Open('C:\Users\Omer\Documents\MATLAB\Booster\betagrouptcalc.xmcd');
sht.SetValue('e1',e1);
sht.SetValue('e2',e2);
sht.SetValue('b',beta);
sht.SetValue('N',Nlayers);
sht.SetValue('kk',Rint);
test1=sht.GetValue('vc').Real;
test2=sht.GetValue('out2').Real;
betagroup=test1;
betaenergy=test2;
I keep getting the same error message:
"Error using Interface.Mathcad_Automation_API.IMathcadWorksheet2/GetValue
Invoke Error, Dispatch Exception:
Source: Mathcad.Worksheet.1
Description: The requested value was not found in the worksheet.
Error in mathcad (line 7)
test1=sht.GetValue('vc').Real;"
Can someone please help me understand what is the problem and how to solve it?
Thank you very much,
Omer.
댓글 수: 1
Thomas
2017년 3월 8일
Hello, can you provide the Mathcad file ?
Thanks
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 External Language Interfaces에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!