Translate R to MATLAB and MATLAB to R with ChatGPT

Illustrates translation of a simple R script to MATLAB, and back to R, using OpenAI's ChatGPT.
ダウンロード: 116
更新 2023/4/6


MATLAB supports interoperability with R but you might want to translate R to MATLAB or the reverse. This script illustrates an experiment in such translation using the interface to ChatGPT 3.5 at Similar things can be done programmatically using the OpenAI API but I find the present API interfaces with a less capable model.[1]
For other code creation and translation experiments, see my scripts at MATLAB File Exchange.


Duncan Carlsmith (2024). Translate R to MATLAB and MATLAB to R with ChatGPT (, MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2023a
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!


バージョン 公開済み リリース ノート

Fix typos