How to use a Mupad function in Matlab workspace
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, i want to use the
function numlib::igcdmult because my aim is to apply the extended euclid algorithm for multiple arguments. I've never used Mupad so i don't know how manage this espression and its values in matlab workspace. In particlar let's try this example
numlib::igcdmult(455,385,165,273);
Please help me.
댓글 수: 0
채택된 답변
Walter Roberson
2018년 3월 13일
evalin(symengine, 'numlib::igcdmult(455,385,165,273)')
feval(symengine, 'numlib::igcdmult', 455, 385, 165, 273)
댓글 수: 3
Walter Roberson
2018년 3월 13일
You cannot pass the values through an array. The closest you can get is
v = [12, 32, 33, 89];
v_cell = num2cell(v);
feval(symengine, 'numlib::igcdmult', v_cell{:});
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!