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 Exchange에서 Creating 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