Can I create and modify variables in an Excel sheet?

3 次查看(过去 30 天)
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.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by