Color Scale for looping script
古いコメントを表示
Hello everyone,
I have some excel files. Each file containing some columns of parameter. I want to plot all of them in one graph with different color gradation (let's say jet colormap).
Below is my existing code from the begining but it failed to plot what I want (I don't know why, this code only plots one file/profile). Does Anyone know the lines I should modify?
best regards,
A=dir('*.xlsx'); %xls
for nn = 1:length(A)
filename = A(nn).name;
data = xlsread(filename); %
z = data(:,1); %first column
s = data(:,2);
t = data(:,3);
numprof = length(A); %number of profile
couleur = jet(numprof);
for nprf= 1:numprof
plot(s,t,'LineWidth',1,'color',couleur(nprf,:));
%legend of plot (?)
end
end
5 件のコメント
Mario Malic
2023 年 10 月 5 日
Add
hold on;
after first line.
Adi Purwandana
2023 年 10 月 5 日
Dyuman Joshi
2023 年 10 月 5 日
"I want to plot all of them in one graph with different color gradation (let's say jet colormap)."
You are plotting lines, which only have a single color assigned/attributed to them.
Adi Purwandana
2023 年 10 月 5 日
Dyuman Joshi
2023 年 10 月 5 日
Okay, you mean different colors for different plots. See my answer below.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

