필터 지우기
필터 지우기

plot .mat file

조회 수: 4 (최근 30일)
SARAH LONER
SARAH LONER 2020년 2월 14일
댓글: Guillaume 2020년 2월 14일
i have value in .mat file and i need to select data as user manual as
[f p]=uigetfile('*.mat*')
a=strcat(p,f)
from this i need to plot graph based on the mat file
can any1 help?
check out my .mat file
  댓글 수: 1
Guillaume
Guillaume 2020년 2월 14일
Your mat file contains a single variable (c1) which is 6x3.
It's unclear what should be plotted against what with this matrix.
---
Completely unrelated, but you should prefer fullfile to strcat to build paths. Also, it's recommend to separate output variable by a , instead of just a space (matlab editor will warn you about it), so:
[f, p] = uigetfile('*.mat'); %use , to separate f and p
a = fullfile(p, f); %use fullfile which automatically adds the correct path separator for your OS
I would also recommend using much more meaningful variable names:
[basename, path] = uigetfile('*.mat');
fullname = fullfile(path, basename);
it makes the code a lot easier to understand.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by