how can i plot ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
abtin irani
el 19 de Ag. de 2019
Comentada: Star Strider
el 20 de Ag. de 2019
I have on matrix such as A=[ 2.8866 2.5708 2.9381 2.6234 2.7873 2.8535 3.5818 4.1817 3.6535 4.6312 4.2028 4.4109 3.6008 4.4279 3.8003 3.7995 4.3140 4.4061 5.2382 4.5073 4.2002 3.9283 3.1146 3.0891]. A is one matrix 24*1.each element of matrix is value of losses for each hour a day.for example for hour between 0 ,1 losses is 2.8866 for hour between 1 ,2 the losses is 2.5708. how can i plot losses for 24 hours?
thanks
0 comentarios
Respuesta aceptada
Star Strider
el 19 de Ag. de 2019
Try this:
A=[2.8866 2.5708 2.9381 2.6234 2.7873 2.8535 3.5818 4.1817 3.6535 4.6312 4.2028 4.4109 3.6008 4.4279 3.8003 3.7995 4.3140 4.4061 5.2382 4.5073 4.2002 3.9283 3.1146 3.0891];
Hours = 0.5:23.5;
figure
stairs(Hours, A)
axis([0.5 23.5 0 6])
set(gca, 'XTick',Hours, 'XTickLabel',(0:23))
grid
xlabel('Hours')
ylabel('Loss')
15 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Annotations 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!