"Invalid use of operator."
9 views (last 30 days)
Show older comments
¿Por qué me aparece el tipo de error "Invalid use of operator." al introducir la expresión Z=5*X.^2+5*Y.^2-X.*Y.-11*X+11*Y.+11 para generar gráficas de contorno? Muchas Gracia
0 Comments
Answers (1)
Arif Hoq
on 18 Feb 2022
Edited: Arif Hoq
on 18 Feb 2022
if you want to perform element-by-element calculations with vectors, you should use a dot (.) before any multiplication (*), division (/), or power (^) operators that involve vectors. but not for addition, subtraction. that's why its showing error.
X=[5,7,8] ; % anyvalue
Y=[7,3,2]; % anyvalue
Z=5*X.^2+5*Y.^2-X.*Y-11*X+11*Y+11
0 Comments
See Also
Categories
Find more on Contour Plots 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!