0

I want to initialize a N array with the same number (ex: 12) When I search i found this:

T = zeros(1,7); %% But this function initialize 7-array with 0 
Result = T [0 0 0 0 0 0 0]

So, I try to do that

T = zeros(1,7)+12; %% I try to add 12 of array 
Result = T [12 12 12 12 12 12 12]

So with T = zeros(1,7)+12; I can initialize N-array with any constant. But I want to know if there is function can do that?

Tripoli
  • 1
  • 4

0 Answers0