Extract vector from math file

15 visualizaciones (últimos 30 días)
Lev Mihailov
Lev Mihailov el 23 de Jul. de 2020
Respondida: Arthur Roué el 23 de Jul. de 2020
Hello! I saved the file in mat format, but it is very large, can I highlight a specific part?
load('C:/ABCdepobv.mat');

Respuestas (2)

waqas
waqas el 23 de Jul. de 2020
You can define the variable which you want to extract:
load('ABCdepobv.mat','B');
More details on saving and loading .MAT files is provided in the link: https://www.mathworks.com/help/matlab/import_export/load-parts-of-variables-from-mat-files.html

Arthur Roué
Arthur Roué el 23 de Jul. de 2020
You can use the matfile function to access and change variables in MAT-file without loading file into memory
matObj = matfile('C:/ABCdepobv.mat')
myVar = matObj.myVar
In this example, myVar is a variable in your MAT-File

Categorías

Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by