create vector that consists only of zeroes

9 ビュー (過去 30 日間)
Locks
Locks 2013 年 4 月 19 日
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 日
err = zeros(size(data13,1), 1) ;
but don't call it "error" as it is the name of a function.
  1 件のコメント
Locks
Locks 2013 年 4 月 19 日
perfect thanks

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

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 4 月 19 日
編集済み: Azzi Abdelmalek 2013 年 4 月 19 日
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'.
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 4 月 19 日
it's not zeroes, it's zeros

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

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by