Clear Filters
Clear Filters

Why only scatter function is not working?

11 views (last 30 days)
x=27:0.5:29
y= [2.41 2.4 2.395 2.39 2.38]
scatter(x,y)
scatter plot is not showing by using thus code.Please clarify.
  10 Comments
Debarati Ghosh
Debarati Ghosh on 12 Oct 2023
@Cris LaPierre sir I am getting this error after putting scatter(x,y)

Sign in to comment.

Accepted Answer

Dyuman Joshi
Dyuman Joshi on 12 Oct 2023
You have named your script after a built-in MATLAB function i.e. error.
It's not a good idea to name variables or scripts or user-defined functions by using built-in function names.
Rename the script and run it again to check if there are any other errors or not.
  6 Comments
Bruno Luong
Bruno Luong on 12 Oct 2023
Edited: Bruno Luong on 12 Oct 2023
How to change error.m file?
Open Windows File explorer Browse to C:\Users\Debarati Ghosh\Documents\MATLAB
Check if error.m is size 0, if yes delete it.
If not rename error.m to something else, e.g. myerror.m then change accordingly what of your mfile that call error to myerror.
I short just basic usage of computer.
Debarati Ghosh
Debarati Ghosh on 12 Oct 2023
@Dyuman Joshi Going by your suggestion it is done.Now I am getting proper result.Thank you sir.

Sign in to comment.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!