I want to create vector of n by n zeros matrix from 1:k. How I can do. Plz help

 採用された回答

Sean de Wolski
Sean de Wolski 2012 年 2 月 3 日

1 投票

Huh?
doc zeros
Maybe:
zeros(n)
or
zeros(n,n,k)

3 件のコメント

Amit
Amit 2012 年 2 月 3 日
zeros(n,n,k) works.
Thanks Sean
Image Analyst
Image Analyst 2012 年 2 月 3 日
If that works, then we call that a 3D array, not a vector. I'd also call it a 3D matrix but I think some, like Steve Lord, consider a matrix as exactly 2 dimensions, no more and no less.
Jan
Jan 2012 年 2 月 4 日
In Matlab vectors are 2D also, but one dimension is singelton.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

タグ

質問済み:

2012 年 2 月 3 日

編集済み:

T
T
2013 年 9 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by