Passing variable names to batch script

2 ビュー (過去 30 日間)
Frederik Theissen
Frederik Theissen 2019 年 4 月 30 日
回答済み: Jeff Miller 2019 年 5 月 1 日
Hi Guys,
I want to pass multiple variables to a batch script from MATLAB using the sytem command:
system(['batchfile.bat ', Variable1])
In the batch file I can then define
set V1 =%1
However, I do not understand how to pass a second variable?
If I do for example:
system(['batchfile.bat ', Variable1, Variable2])
it simply merges Variable1 and Variable2 as Variable1Variable2
Is there a better way to define multiple variables from MATLAB for use in my batch script?
Thanks
F

回答 (1 件)

Jeff Miller
Jeff Miller 2019 年 5 月 1 日
Try
system(['batchfile.bat ', Variable1, ' ', Variable2])

カテゴリ

Help Center および File ExchangeEntering Commands についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by