How to Scatter Plot a data set reading from a single column of excel file?

I read a specific column of data from an excel file using following:
num = xlsread('newdata.xlsx', 'B:B');
While using plot(num), it works fine plotting a line graph where the x-axis is a continuous automatic value and y is the extracted column value. However, when I am trying scatter(num) it gives me Error. Isn't that possible to create scatter plot with a single column data please?

 Réponse acceptée

num = xlsread('newdata.xlsx', 'B:B');
x = 1:length(num) ;
scatter(x,num) ;

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by