フィルターのクリア

How to trim data in a matrix?

85 ビュー (過去 30 日間)
flemingtb
flemingtb 2018 年 9 月 12 日
編集済み: jonas 2018 年 9 月 12 日
I have a matrix 800x800, from X(0:130) and X(589:end) is garbage. How do i remove the data so that i can surface plot it?
If there is a link on how to manipulate data in MATLAB i'd appreciate it, it seems i spend most of my time goofing around with this type of stuff. Any help is greatly appreciated.
  1 件のコメント
Rik
Rik 2018 年 9 月 12 日
You mean like this?
X_smaller=X(131:588,131:588);

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

採用された回答

jonas
jonas 2018 年 9 月 12 日
編集済み: jonas 2018 年 9 月 12 日
X(0) is not a valid index. Try this:
X(:,[1:130,589:end])=[];
This removes the columns from 1 to 130 and 589 onward, so that you end up with a matrix of size ~800x450,
You could have a read here ( link )

その他の回答 (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