MATLAB Answers

Extracts columns using functions

조회 수: 4(최근 30일)
I have raw .mat file. The data inside the file is not in the form of the matrix.
However based on few conditions i need to extract one coulmn of data.
How do i do that using a function ?
Kindly help.
  댓글 수: 2
Ameer Hamza
Ameer Hamza 27 Mar 2020
What do you mean by raw .mat file? Are you trying to open .mat file in some other software?

댓글을 달려면 로그인하십시오.

채택된 답변

Anurag Agrawal
Anurag Agrawal 30 Mar 2020
Your question sounds incomplete. However from my understanding, you can use matfile function to access and change variables in MAT-file without loading file into memory.
For example, if you have matrix a saved in abcd.mat, you can access it using:
myObj = matfile('abcd.mat');
Then you can access 3rd column like
x = myObj.a(:,3);

추가 답변(0개)


Community Treasure Hunt

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

Start Hunting!

Translated by