Plotting simplenarx_dataset
Mostrar comentarios más antiguos
I tried to plot the simplenarx_dataset but it is coming up blank (i get a graph with x and y axis but no data in it). Can anyone help me?
load simplenarx_dataset;
data = simplenarx_dataset;
figure; plot(data{1});
hold on;
plot(data{2});
xlabel('Time');
ylabel('Value');
legend('Input', 'Output');
3 comentarios
Dyuman Joshi
el 24 de Ag. de 2023
You will need to provide the file simplenarx_dataset for us to give any working suggestion/solution.
Please attach the file via the paperclip button.
Gibbov
el 24 de Ag. de 2023
Dyuman Joshi
el 24 de Ag. de 2023
I see, I was not aware of this particular dataset.
Respuesta aceptada
Más respuestas (1)
simplenarx_dataset is a 1x100 cell array, with each cell element containing a numerica scalar.
load simplenarx_dataset;
data = simplenarx_dataset
When plotting a numeric scalar via plot, you will need to specify a marker to show the point on the figure -
figure;
plot(data{1},'r*');
hold on;
plot(data{2},'bo');
xlabel('Time');
ylabel('Value');
legend('Input', 'Output');
You can also use scatter to show scalar points on figure, which does not require markers input for that.
1 comentario
Gibbov
el 26 de Ag. de 2023
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


