graph with two formulas
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
grace khashman
el 13 de Sept. de 2021
Comentada: grace khashman
el 13 de Sept. de 2021
Hello everyone
im trying to do like this graph below with the information in the excel file below in matlab.
my graph has to contain two serieses (unsucessful attacs- in red and sucessful attacs -in green)
also the y axis has to desplay (the % of sucessful and unsucessful attacks wich are in cloumn A in my excel file) and the X axis has to desplay (the con den of sucessful and unsucessfull attacks which are in cloumn B in my excel file)
how can i do this in matlab?
please help me
i appreciated it
2 comentarios
Rik
el 13 de Sept. de 2021
You seem to want not just the normal graphs, but also the error bars for each plot.
What did you try? Which functions did you try to load your data into Matlab? Which functions did you try to create a plot based on your data? The top Google result must have taught you something, what was that?
Respuesta aceptada
Rik
el 13 de Sept. de 2021
You probably want the errorbar function:
x = 1:10:100;
y = [20 30 45 40 60 65 80 75 95 90];
err = 8*ones(size(y));
errorbar(x,y,err)
Más respuestas (1)
Dave B
el 13 de Sept. de 2021
You can make the error bars with the errorbar function, but your excel file doesn't appear to include data about error...
a=readtable('LAST .xlsx','Range','A1:B9');
b=readtable('LAST .xlsx','Range','A10:B18');
a=sortrows(a,'unsucessfulConDen');
b=sortrows(b,'successfulConDen');
clf
plot(a.unsucessfulConDen,a.x_UnsucessfulAttacks,'LineWidth',1)
hold on
plot(b.successfulConDen,b.x_SucessfulAttacks,'LineWidth',1)
legend('Unsuccessful','Successful')
Ver también
Categorías
Más información sobre Bar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!