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.

 採用された回答

Walter Roberson
Walter Roberson 2018 年 3 月 13 日

1 投票

evalin(symengine, 'numlib::igcdmult(455,385,165,273)')
feval(symengine, 'numlib::igcdmult', 455, 385, 165, 273)

3 件のコメント

Damiano Capocci
Damiano Capocci 2018 年 3 月 13 日
ok thank you. Could u also tell me a way to pass all those numbers though an array? Because if i do, foe example :
v=[12,32,33,89];
feval(symengine, 'numlib::igcdmult', v)
i receive
ans =
numlib::igcdmult(matrix([[12, 32, 33, 89]]))
which is unknown to me!
Walter Roberson
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{:});
Damiano Capocci
Damiano Capocci 2018 年 3 月 13 日
Perfect, thank you again.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by