Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
This Live Script applies the code Generate MATLAB Code Using ChatGPT API to translate python code to executable MATLAB code using OpenAI's ChatGPT. The python code translated is an example read from a matplotlib url. By scraping all of the examples from that respository, or a similar repository, entire python libraries might in principle be translated.
To use this script, open a free account and and receive an API secret key at https://platform.openai.com/account/api-keys and save your key to a text file in the path of the script. The .m file generated may be opened in MATLAB and saved as Live Script.
View and like related scripts at https://www.mathworks.com/matlabcentral/fileexchange/?q=carlsmith&sort=date_desc_submitted
Citation pour cette source
Duncan Carlsmith (2026). Translate Python To MATLAB With ChatGPT Programmatically (https://fr.mathworks.com/matlabcentral/fileexchange/126734-translate-python-to-matlab-with-chatgpt-programmatically), MATLAB Central File Exchange. Extrait(e) le .
Remerciements
Inspiré par : Generate MATLAB Code Using ChatGPT API
A inspiré : Code Generation Comparison for MATLAB - ChatGPT versus Bard
Informations générales
- Version 1.01 (623 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.01 | Added interactive_examples tag |
||
| 1.0.2 | Add link |
||
| 1.0.1 | cosmetic |
||
| 1.0.0 |
