Load Variables in Matlab 7: How to Adjust Settings

  • MATLAB
  • Thread starter Ai52487963
  • Start date
  • Tags
    Load Matlab
In summary, the conversation discusses the difference in how the load function stores variables in Matlab R2008 and Matlab 7. While in R2008, the variable is stored with the full ascii filename, in Matlab 7 it is only stored as "DES". The person asks if there is a way to have Matlab 7 load the full ascii filename or use the 7.8 version where it loads the first filetype extension. It is suggested to try using single quotes around the file name and to check the documentation for information about backwards compatibility. It is also mentioned that adding a flag like -version4 may be necessary for older versions to open the file, but this is likely not needed for 2008 to 2007.
  • #1
Ai52487963
115
0
Real quick question:

I had been using MatlabR2008 for a while and got used to how the load function stores variables, so my scripts are all based around it. However, I'm working with an older version of Matlab right now that when I load it, does this:

Matlab R2008 load:

load DES.incompl1.output

stores a variable

DES_incompl1 (this is what I want)




Matlab 7 load:

load DES.incompl1.output

stores a variable

DES


Is there a way in Matlab 7 to have it load the full ascii filename or make it do the 7.8 version where it loads the first filetype extension thing?
 
Physics news on Phys.org
  • #2
Have you tried using single quotes around the file name?

The documentation has some information about backwards compatibility - sometimes you need to add a flag like -version4 to save it so older version can open it, but my guess is that this is not required for 2008 -> 2007.

-Kerry
 
  • #3


As a scientist, it is important to understand and adapt to different versions of software in order to effectively analyze and interpret data. In this case, the issue is with the load function in Matlab, and it seems that the older version is not automatically including the full ascii filename in the variable name. This can be easily fixed by adjusting the settings in Matlab 7 to load the full filename or to follow the format of the newer version.

To do this, you can go to the "Preferences" or "Settings" menu in Matlab 7 and look for the option to adjust the load function settings. From there, you can select the option to load the full filename or to follow the newer version's format. This will ensure that your scripts are compatible and your data is accurately stored.

It is also important to note that different versions of software may have slight variations in their functions, and it is always helpful to refer to the software's documentation for any troubleshooting or customization needs. As a scientist, it is crucial to stay updated on software versions and their capabilities to effectively and accurately analyze data.
 

1. What are load variables in Matlab 7 and how do they work?

Load variables in Matlab 7 are used to adjust settings for data loading and processing. They allow you to specify options such as file format, data type, and variable names. When loading data into Matlab, the load variables are used to customize how the data is imported and stored in the workspace.

2. How do I access the load variables in Matlab 7?

The load variables can be accessed through the "importdata" command or the "load" command in Matlab. You can also access them by going to the "File" menu and selecting "Import Data" or by using the "Import Data" toolbar button.

3. What are some common options that can be adjusted using load variables?

Some common options that can be adjusted using load variables include the file format (such as text, binary, or spreadsheet), the delimiter used to separate data values, and the number of header lines to skip. You can also specify the expected data type for each column of data and rename variables during the import process.

4. Can I save my load variables for future use?

Yes, you can save your load variables by creating a script or function that contains the necessary commands. This way, you can easily import the same type of data with the same settings in the future, without having to manually adjust the load variables each time.

5. Are there any other useful features related to load variables in Matlab 7?

Yes, there are some additional features that can be helpful when working with load variables. For example, you can use the "Variable Editor" to view and modify the imported data before it is stored in the workspace. You can also use the "Import Tool" to interactively adjust the load variables and preview the imported data before loading it into Matlab.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
978
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
4K
Replies
8
Views
835
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
735
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • General Engineering
Replies
1
Views
982
Back
Top