필터 지우기
필터 지우기

How to generate a 1D array of zeros in Matlab?

조회 수: 178 (최근 30일)
Devika Waghela
Devika Waghela 2021년 3월 24일
댓글: Jan 2022년 3월 6일
I want to create an 1D array of 100,000 elements in matlab full of zeros

답변 (2개)

Jan
Jan 2021년 3월 24일
편집: Jan 2021년 3월 24일
Please read the Getting Started chapters of the documentation and Matlab's Onramp: https://www.mathworks.com/learn/tutorials/matlab-onramp.html
It is not efficient if beginners ask all basic details in the forum.
x = zeros(1, 100000)
  댓글 수: 2
José Montoya
José Montoya 2022년 3월 5일
What do you mean, not efficient? Let every detail be asked and every possible line on matlab show up on a google search!
The forum won't be crashing, and mathworks won't go broke on server space from a couple extra million questions.
Jan
Jan 2022년 3월 6일
@José Montoya: Asking a question in the forum means to wait 10 minutes to 3 days in average for the answer. Therefore reading the documentation are running the online tutorials is much more efficient for the users, because it is faster and clarifies dozens of standard questions in a compact way. Asking them all would takes weeks until a beginner can start to write useful codes. With the tutorials this takes 1 or 2 hours only.
Remember, that this forum does not live from questions only, but from the answers. The answering persons are volunteers and their time is valuable. Then asking for details, which are explained in the tutorials and manuals exhaustively already, is not efficient, but it wastes time, which could be spent in answers, which are not found elsewhere already.
"The forum won't be crashing" - I do disagree. The forum would crash, if all beginners ask for all details, because then the forum is to boring to particpate and filled with noise. This is not a question of the servers, but on the persons, who post answers in their sparetime.
Sometimes it more useful to tell a user, how he or she can solve the problems by their own. It is like telling someone how to fish, instead of giving one fish.
The top 10 answers have posted about 170'000 answers since this forum was started in 2009. Some million additional questions would kill the forum.
Feel free to give as many answers as you can, for advanced or beginner questions.

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


William Rose
William Rose 2021년 3월 24일
data=zeros(100000,1); %column vector
data=zeros(1,100000); %row vector

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by