hello. i have a output matrix of 253 x 253. i want a small matrix of 90 x 90. how do i do that. please help.

댓글 수: 2

dbmn
dbmn 2017년 4월 11일
More info about the choice of the 90 elements is needed. Please specify (f.ex. interpolation, first / last 90 elements etc)
Shweta Naiskar
Shweta Naiskar 2017년 4월 11일
any 90 elements will do

댓글을 달려면 로그인하십시오.

답변 (1개)

Adam
Adam 2017년 4월 11일
편집: Adam 2017년 4월 11일

0 개 추천

If you don't care which 90 by 90 elements then
outputMatrix(1:90,1:90)
will do this. As will
outputMatrix(101:190,151:240)
and a whole host of other possibilities.

댓글 수: 3

Shweta Naiskar
Shweta Naiskar 2017년 4월 11일
it is giving me an error for outputMatrix. it says it as an undefined function or variable.
Stephen23
Stephen23 2017년 4월 11일
@Shweta Naiskar: outputMatrix is the name of your matrix. Use whatever variable name your matrix has.
Guillaume
Guillaume 2017년 4월 11일
편집: Guillaume 2017년 4월 11일
So, if Adam had written code to erase everything on your hard drive, you'd have tried to execute it without trying to understand what it does? Scary thought...
Maybe try to understand what Adam has written. This is very very basic matlab. You should have immediately realised that outputMatrix is to be replaced by whatever name you use for your own matrix.
If you do not understand what Adam answer does, then before progressing any further, you should go through the Getting Started with Matlab tutorial. Chapter 3 on array indexing is of particular interest to you. Again, this is extremely basic matlab that every beginner should understand.
Note: I very much doubt that the answer provided is what you want to do, but since you've provided so little information on what you want, it's equally valid as any other possible answer.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2017년 4월 11일

편집:

2017년 4월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by