フィルターのクリア

How to plot a graph by extracting the variables from each .mat file?

3 ビュー (過去 30 日間)
Anu
Anu 2021 年 12 月 1 日
コメント済み: Palguna Gopireddy 2022 年 2 月 24 日
I have 10 .mat files in a folder. The name of each file is mean1.mat, mean2.mat, mean3.mat, and so on. In each mat file I have x and y as variables. I want to plot x and y extracted from each .mat file as a scatter plot. May I know how should I do it?
Thanks in advance.

採用された回答

KSSV
KSSV 2021 年 12 月 1 日
matFiles = dir('*.mat') ;
N = length(matFiles) ;
figure
hold on
for i = 1:N
load(matFiles(i).name) ;
scatter(x,y,[],'b','filled','c')
end
  2 件のコメント
Anu
Anu 2021 年 12 月 1 日
Thanks so much, @KSSV
Palguna Gopireddy
Palguna Gopireddy 2022 年 2 月 24 日
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by