Can I create and modify variables in an Excel sheet?

3 visualizzazioni (ultimi 30 giorni)
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 Commento
Geoff Hayes
Geoff Hayes il 16 Set 2021
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.

Accedi per commentare.

Risposte (1)

Image Analyst
Image Analyst il 16 Set 2021
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 Commenti
Missael Hernandez
Missael Hernandez il 16 Set 2021
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 il 16 Set 2021
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.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by