plotting 2 .mat fikes ith the same variable name

조회 수: 2 (최근 30일)
Chantal Lewis
Chantal Lewis 2019년 11월 6일
답변: Katie 2019년 11월 6일
hello,
how do i plot data from 2 different .mat files whihc contain data using the sam variable names without overwriting the data

채택된 답변

Katie
Katie 2019년 11월 6일
When you load the .mat files you can store the contents in two different variables and then dot index your variables:
Data=load('file1.mat');
Data1=load('file2.mat');
figure;
plot(Data.x, Data.y);
hold on;
plot(Data1.x, Data1.y);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by