Scatter plot undefined variable
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jackie Yang
le 14 Août 2019
Commenté : Steven Lord
le 9 Août 2023
Hi, i just started using Matlab for a personal project, I don't have any experience with it.
I'v tried to plot scatter plots with 3 different appropriate data sets and they all get the same error:
This is the same for every data set that I use...
Can i please get some help trying to fix this? Here's line 56
Thank you!
0 commentaires
Réponse acceptée
Geoff Hayes
le 14 Août 2019
Jackie - is the MATLAB code that you have posted above from the built-in MATLAB scatter function? Or is it something hat you have written? In the command window type
which scatter -all
to see which implementations of this function exist. If more than one exists, then you may want to rename your function to not conflict with the built-in one.
As for the error, at line 55 the boolean allowNonNumeric is defined but allowNumeric is being passed into the getRealData function. If this is your code, then try modifying it to keep the variables consistent.
3 commentaires
Plus de réponses (2)
Andrey Kiselnikov
le 14 Août 2019
Modifié(e) : Andrey Kiselnikov
le 14 Août 2019
"allowNonNumeric" and "allowNumeric" are different variables, you defined first one and forgot last one (I assume this is mistake).
Good reference with ready to try examples is here
If my help was useful please mark this answer as accepted.
Sourov
le 9 Août 2023
Modifié(e) : Sourov
le 9 Août 2023
Not any kinds of 2d scatter plot are functioning in Matlab R2023a. Why?
1 commentaire
Steven Lord
le 9 Août 2023
What does "Not ... functioning" mean in this context?
- Do you receive warning and/or error messages? If so the full and exact text of those messages (all the text displayed in orange and/or red in the Command Window) may be useful in determining what's going on and how to avoid the warning and/or error.
- Does it do something different than what you expected? If so, what did it do and what did you expect it to do?
- Did MATLAB crash? If so please send the crash log file (with a description of what you were running or doing in MATLAB when the crash occured) to Technical Support so we can investigate.
I'd also make sure that you haven't written a scatter.m file that's taking precedence over the scatter function included as part of MATLAB. Do you see any scatter.m file that are not under the matlabroot directory?
which -all scatter
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!