??? Index exceeds matrix dimensions.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Actually I am trying to plot the local maxima on a data which is a matrix but i get this error '??? Index exceeds matrix dimensions.' here is my code
surf(T,f,G'), shading interp
[Gmax,imax,Gmin,imin] = extrema2(G);
hold on
plot3(T(imax),f(imax),Gmax,'bo')
for i = 1:length(Gmax)
text(x(imax(i)),y(imax(i)),zmax(i),[' ' num2str(zmax(i))])
end
hold off
the error is in the line ' plot3(T(imax),f(imax),Gmax,'bo')' how can i change the size of the vector T ad imax is very large this is what creates the problem. The extreme2 function can be found in this link 'http://www.mathworks.com/matlabcentral/fileexchange/12275'
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing 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!