Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the correct parameter type for the zeroes function?

Tags:

matlab

num = input('Enter the size')

I want to create a 2 dimensional matrix matrix of dimensions numx2 using num. So I use zeroes(num, 2);

However I get this error

Undefined function or method 'zeroes' for input
arguments of type 'double'.

I tried casting to a uint8 and an int8 and it didnt work so I looked up the matlab documentation but it doesnt give the parameter types for functions. So anybody know how to create this 2d matrix using the value of num that I get from the user?

like image 859
Jim_CS Avatar asked Dec 12 '22 04:12

Jim_CS


1 Answers

The function you want to use is zeros not zeroes

like image 197
david.s Avatar answered Mar 07 '23 11:03

david.s