How to fill the markers in a plot?

405 Ansichten (letzte 30 Tage)
Vishnuvardhan Naidu Tanga
Vishnuvardhan Naidu Tanga am 6 Okt. 2022
Beantwortet: Matt J am 6 Okt. 2022
Hello all,
Can some one tell me how can I fill the markers in the plot. My code is as follows. Please help me.
Z = readtable('Experimental_data_botheq.xlsx') ;
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
data = table2array(Z) ;
plot(data(:,1), data(:,2), 'ko', 'linewidth', 2);
hold on
plot(data(:,3), data(:,4), 'ks', 'linewidth', 2);
hold on
plot(data(:,5), data(:,6), 'k^', 'linewidth', 2);
hold on
plot(data(:,7), data(:,8), 'kv', 'linewidth', 2);
hold on
plot(data(:,9), data(:,10), 'ko', 'linewidth', 2);
hold on
plot(data(:,11), data(:,12), 'ks', 'linewidth', 2);
hold on
plot(data(:,13), data(:,14), 'k^', 'linewidth', 2);
hold on
plot(data(:,15), data(:,16), 'kv', 'linewidth', 2);
hold off

Akzeptierte Antwort

Matt J
Matt J am 6 Okt. 2022
Z = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1147865/Experimental_data_botheq.xlsx') ;
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
data = table2array(Z) ;
plot(data(:,1), data(:,2), 'ko', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,3), data(:,4), 'ks', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,5), data(:,6), 'k^', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,7), data(:,8), 'kv', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,9), data(:,10), 'ko', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,11), data(:,12), 'ks', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,13), data(:,14), 'k^', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,15), data(:,16), 'kv', 'linewidth', 2,'MarkerFaceColor','k');
hold off

Weitere Antworten (0)

Kategorien

Mehr zu Test and Measurement finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by