??? Index exceeds matrix dimensions.

1 回表示 (過去 30 日間)
raj
raj 2012 年 3 月 22 日
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 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by