Translate matlab code for syntax maple in matlab

1 vue (au cours des 30 derniers jours)
Tan
Tan le 3 Fév 2017
Modifié(e) : Stephen23 le 3 Fév 2017
Hi, How do I translate matlab code for syntax maple in matlab? I do convert base using syntax matlab
maple('convert([2,5,7],base,20,2')'
but i want [2,5,7] as input.
Can anyone help me?
I try like this but get error
a=[2,5,7]; maple('convert([2,5,7],base,20,2')'

Réponse acceptée

Stephen23
Stephen23 le 3 Fév 2017
Modifié(e) : Stephen23 le 3 Fév 2017
Why do you need Maple for this? What is wrong with MATLAB code, e.g. John D'Errico's excellent FEX submission base2base:
>> base2base([2,5,7],20,2)
ans =
1 1 1 0 0 0 1 0 1 1
  2 commentaires
Tan
Tan le 3 Fév 2017
Modifié(e) : Tan le 3 Fév 2017
Thank you Stephen:)This really helped me!
Stephen23
Stephen23 le 3 Fév 2017
Modifié(e) : Stephen23 le 3 Fév 2017
@Tan: do not copy and paste that file: simply click the big Download button, unzip and place the file on your MATLAB path (e.g. the current directory).
It sounds like you copied it but did not copy the first (and most important line). base2base is not a script, and the file on FEX is correct, so you must have done something to it when you copied it.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by