3D plot or surf plot problem

3 ビュー (過去 30 日間)
VISWANATH
VISWANATH 2011 年 5 月 5 日
Hello all,
I have a problem, trying to solve it for the last two days, but could not succeed. ANY HELP WOULD BE GREATLY APPRECIATED.
I have a data in txt file called 'ecoli'. The first column and first row are wavelength parameters.
The rest of the matrix contains intensity values.
here is what i have done. I have deleted first element in first column and row because it was a X/Y text parameter.
Then i have reduced matrix by deleting first column and row, to get the rest of the intensity value matrix.
X=ecoli(:,1);
>> Y=ecoli(1,:);
>> ind=[1]
ind =
1
>> X(ind)=[]; >> Y(ind)=[]; >> ecoli(:,1)=[]; >> ecoli(1,:)=[]; >> Z=ecoli; >> plot3(X,Y,Z);
I get this error.
??? Error using ==> plot3 Vectors must be the same lengths.
Could somebody through some light on this problem. I know some where the lengths of vectors are not same thats y i could not plot.
Thanks

採用された回答

Sean de Wolski
Sean de Wolski 2011 年 5 月 5 日
Ecoli - fun stuff
size(X)
size(Y)
size(Z)
which one is different and why?
  18 件のコメント
Teja Muppirala
Teja Muppirala 2011 年 5 月 6 日
Oops, I guess I didn't really need to put that meshgrid line in there
VISWANATH
VISWANATH 2011 年 5 月 6 日
Hey Teja, thanks for your help. I just used Z' instead of Z in surf(X,Y,Z'). I got the surface plot. Sorry for messing up myself....Thanks a mil...

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by