create vector that consists only of zeroes

hi,
I tried to create a vector that consists only of zeroes and tried the following:
error=zeroes(length(data13(:,1)))
but it didn't work. my goal is it, that the lenght of the error vector/ the number of elements in the vecotr is the same as in column one of the matrix data13

 채택된 답변

Cedric
Cedric 2013년 4월 19일
편집: Cedric 2013년 4월 19일

0 개 추천

err = zeros(size(data13,1), 1) ;
but don't call it "error" as it is the name of a function.

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 4월 19일
편집: Azzi Abdelmalek 2013년 4월 19일

1 개 추천

It's not zeroes, it's zeros
error=zeros(length(data13(:,1)),1)
%or
zeros(size(data13,1),1)

댓글 수: 2

Locks
Locks 2013년 4월 19일
that does not work either, I get this error message:
Undefined function 'zeroes' for input arguments of type 'double'.
it's not zeroes, it's zeros

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

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2013년 4월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by