specifying the horizontal linetype '_' produces an error.
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Bruce Wayne
el 21 de Sept. de 2020
Comentada: Adam Danz
el 30 de Sept. de 2020
scatter3(x,y,z,'_')
produces:
Error using scatter3 (line 45)
Invalid color or line sytle.
0 comentarios
Respuesta aceptada
Steven Lord
el 21 de Sept. de 2020
The horizontal and vertical line markers for plots were introduced in release R2020b. If you're using an older release you will not be able to use them.
3 comentarios
madhan ravi
el 21 de Sept. de 2020
If you want to use 2020b version instantaneously, just use MATLAB Online.
Adam Danz
el 30 de Sept. de 2020
Steven Lord's answer inspired me to write a Community Highlights post about these two new marker symbols.
Más respuestas (2)
Star Strider
el 21 de Sept. de 2020
Function arguments in MATLAB are positional, so it is necessary to provide values for the interventing arguments to use later arguments.
This plots red horizontal lines at the appropriate places:
scatter3(x,y,z,[],'r','_')
.
2 comentarios
Star Strider
el 21 de Sept. de 2020
The code I posted works correctly in R202b.
So does this:
figure
plot3(x,y,z,'_r')
grid
producing the same as the scatter3 call.
What version of MATLAB are you using? The online documentation is for R2020b, and may not be appropriate (or accurate) for all earlier versions.
Walter Roberson
el 21 de Sept. de 2020
Editada: Walter Roberson
el 21 de Sept. de 2020
horizontal line style is '-' not '_'
2 comentarios
Star Strider
el 21 de Sept. de 2020
The '_' was new to me too. It may be new in R2020b. See markertype in the current (2020b) online documentation.
Ver también
Categorías
Más información sobre Simulink Functions 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!