Can I create and modify variables in an Excel sheet?

3 ビュー (過去 30 日間)
Missael Hernandez
Missael Hernandez 2021 年 9 月 16 日
コメント済み: Missael Hernandez 2021 年 9 月 16 日
Suppose that someone does not have access to MATLAB, but does to Excel. Could they edit a variable in an Excel sheet, send that sheet to me, and once I upload to it to the Current Folder in MATLAB, have those modifications show up in the workspace?
  1 件のコメント
Geoff Hayes
Geoff Hayes 2021 年 9 月 16 日
Missael - if someone sends you an updated Excel spreadsheet then those modifications will show up in the MATLAB workspace only once you read (via whichever MATLAB code that you have written) that updated file.

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2021 年 9 月 16 日
Yes, they can give you data in whatever form you like - text file, csv file, xlsx file, etc. Then you can read in the file and use that variable. When you read them in, they will show up in the workspace.
  8 件のコメント
Missael Hernandez
Missael Hernandez 2021 年 9 月 16 日
No. So I have some huge model in Simulink (which requires New Eagle). Some of the blocks have Help Text strings that I, the user, can insert. Like for example, I can put "This block is the vehicle speed." So what I want to do, is make that a variable so any user can chage that string if they want. I already figured that out. I want to take it a step further and use Excel or Notepad, to have a user, who may not have MATLAB, download the Workspace as an Excel/Notepad file, and have them modify that Help Text string in Excel/Notepad. Then I can add that file to the Current Folder on MATLAB and have the Workspace variabales updated to whatever the user put.
Missael Hernandez
Missael Hernandez 2021 年 9 月 16 日
The highlighted portion is where the string goes. All you do is click the 3 vertical dots to make it a variable and it'll show up in the Workspace.

サインインしてコメントする。

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by