how to resize a matrix?

4 ビュー (過去 30 日間)
trailokya
trailokya 2014 年 11 月 20 日
コメント済み: trailokya 2014 年 11 月 22 日
I have a matrix A of dimension 129*135. I want to make it 135*135 by adding some NaN values. How is it possible in a simple way?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 11 月 20 日
編集済み: Azzi Abdelmalek 2014 年 11 月 20 日
a=rand(129,135) % Example
a(end+1:135,:)=nan
  3 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 11 月 20 日
The same thing
a=rand(129,135,33);
a(end+1:135,:,:)=nan
trailokya
trailokya 2014 年 11 月 22 日
thank you sir

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

その他の回答 (1 件)

Phillip
Phillip 2014 年 11 月 20 日
Hi
There are a number of ways you can do this. At the command prompt type:
help vertcat
and
help nan
This will get you started. Matlab's very powerful at indexing etc. So reading through the basic tuturials and examples will get you started quickly
Regards, Phil
  1 件のコメント
trailokya
trailokya 2014 年 11 月 20 日
thanks :)

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

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by