Does matlab have a tool to translate code from Spanish to English?

2 ビュー (過去 30 日間)
Msutto51
Msutto51 2016 年 9 月 2 日
回答済み: Msutto51 2018 年 8 月 10 日
Received a Matlab script from my counterpart in Spain for removing error from test data. My issue is the script is in Spanish and need to change certain parts of the script for test equipment differences!
Does matlab have a tool to translate code from Spanish to English?

回答 (4 件)

Sean de Wolski
Sean de Wolski 2016 年 9 月 2 日
No it does not. This will be a semimanual process unfortunately.
Find and replace will be your friend.

Steven Lord
Steven Lord 2016 年 9 月 2 日
The names of MATLAB commands are not language-dependent, so I'm not sure what exactly you mean by "translate code from Spanish to English". Do you mean that there is some configuration (specifying date/time formats, character sets, etc.) that is dependent on your locale? If that's the case I would store the locale-dependent information as data, as a MAT-file or a separate function/class file, and have the code that needs the locale-dependent information query the data for the appropriate piece of information. For instance:
function z = getTimeZone(locale)
z = locale.timezone;
Then have separate functions for Boston, Massachusetts:
function locale = bostonData
locale.timezone = 'UTC-05:00 Eastern';
and Greenwich, England:
function locale = greenwichData
locale.timezone = 'UTC Coordinated Universal Time'
Use these pieces of data like:
getTimeZone(bostonData)
getTimeZone(greenwichData)
The getTimeZone function won't need to change even if the time zone information does, or if you need to add time zone data for some other city. All you'll need to do is write another data function and pass the appropriate information into getTimeZone.

Msutto51
Msutto51 2016 年 9 月 2 日
Thank you for you're help. I overlooked a few factors

Msutto51
Msutto51 2018 年 8 月 10 日
Find and Replace was the trick.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by