Error: Expression or statement is incomplete or incorrect.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Sana khan
el 15 de Abr. de 2017
Respondida: Star Strider
el 15 de Abr. de 2017
the error will be occur in this code portion
% check if an RGB color is in the +/-30 range of rgb(100, 110, 120)
R = 128;
G = 100;
B = 220;
result = R > 70 && R < 130 &&
G > 80 && G < 140 &&
B > 90 && B < 150;
0 comentarios
Respuesta aceptada
Star Strider
el 15 de Abr. de 2017
Use continuation ellipsis (dots):
R = 128;
G = 100;
B = 220;
result = R > 70 && R < 130 && ...
G > 80 && G < 140 && ...
B > 90 && B < 150;
See the documentation on Special Characters [ ] ( ) {} = ' . ... , ; : % ! @ (link) for informaiton on this and others, and specifically Continue Long Statements on Multiple Lines.
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!