"Arrays have incompatible sizes for this operation" error
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
As you can see in the attached photo, all of my arrays have the same size (3600 x 3601). So, I don't understand how I keep getting this error.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1708536/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1708536/image.jpeg)
0 commentaires
Réponses (1)
the cyclist
le 3 Juin 2024
It's difficult to know for sure, but I'm guessing those are the variables as they exist in the workspace, outside the function.
Inside the function, you are loading the variables. Are you sure they are all the same size inside of those *.MAT files? Try putting a breakpoint at line 11 of your code, and see what the variable sizes are there.
Can you upload the files here (and your actual code, not a screenshot), so we can try?
7 commentaires
Steven Lord
le 3 Juin 2024
Take a look at the imresize function and/or this example from the interpolation documentation. If you're using Mapping Toolbox there may be functions you can use in that product as well, ones that are designed specifically for working with geographic data. Maybe georesize?
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots 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!