Creating Line plot with matlab

1 次查看(过去 30 天)
Jonathan Asante
Jonathan Asante 2018-6-13
回答: KSSV 2018-6-13
Hi I would be glad if someone can help me to create a line plot for the table below. AgentID Strategy Abilities Score Agent 1 NaiveC 159 980 Agent 6 NaiveD 159 980 Agent 4 NaiveC 157 970 Agent 5 NaiveC 157 970 Agent 9 NaiveD 157 970 Agent 10NaiveD 157 970 Agent 3 NaiveC 156 965 Agent 8 NaiveD 156 965 Agent 2 NaiveC 143 900 Agent 7 NaiveD 143 900
I will like abilities on the x-axis, score on the y-axis and two plots grouped by Strategy representing NaiveC and NaiveD.
Thanks for the help

回答(1 个)

KSSV
KSSV 2018-6-13
x = 1:10 ;
y = 1:10 ;
[X,Y] = meshgrid(x,y) ;
plot(X,Y,'k')
hold on
plot(X',Y','k')

Community Treasure Hunt

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

Start Hunting!

Translated by