.mat matrix use in folder

2 visualizzazioni (ultimi 30 giorni)
Frank Uhlig
Frank Uhlig il 27 Giu 2022
Commentato: Walter Roberson il 17 Apr 2025
I have saved a fixed matrix with a name in my current working Matlab folder on Mac. Now it appears as 'G.... .mat' there when I click on "open" in that folder; together with all my function m-files in there. it takes the identical 368 bytes as in the Mac finder.
How can I work with that saved .mat file inside the local m-files in this folder ?
I tried the 'load G... .mat' command but that does not work; I have tried to run some of my codes with 'G... .mat' in place of my general A matrix input. Does not work work either.
I then tried to see the contents of this .mat file by cicking on it in the local Matlab finder window: This shows nothing.
I have read and tried out all what is advised here and on the general internet. Nothing works for me. Why, oh why did I try to save and multiply use that 'G... .mat' matrix, rather than typing it in by hand everytime I want to work on it again ? Why, oh why?
  5 Commenti
Cris LaPierre
Cris LaPierre il 17 Apr 2025
Consider sharing the code you used to create your mat file.
Walter Roberson
Walter Roberson il 17 Apr 2025
whos -file "Godunov.mat"
You needed either
whos -file Godunov.mat
or
whos -file 'Godunov.mat'
or
whos("-file", "Godunov.mat")
or
whos('-file', 'Godunov.mat')
When you use command/function equivalence, the parameters are automatically parsed as (single-) quoted character vectors, but the parser knows to ignore leading and trailing single-quotes. The parser does not know to ignore leading and trailing double-quotes so when you specify them, they become part of the literal file name.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by