MATLAB: Undefined function type double

double array undefined

Good evening friends,
i have a very simple problem with this code(but my brain is out of service and i need to solve it by tomorrow)
arr=1;
deltaTe=0.5;
deltaTemax=80;
imax=100;
for giorno=1:365
nname=['Tuttigiorni/Variazionegiorno_',num2str(giorno),'.txt'];
nfid=fopen(nname,'r');
while ~feof(nfid)
hhead=fscanf(nfid,'%f',2);
if ~isempty(hhead)
gggradi(arr)=hhead(2);
ggradi(arr)=fix(gggradi(arr));
i=fix(ggradi(arr)/deltaTe)+1;
vettore(i)=vettore(i)+1;
end
arr=arr+1;
end
end
vettore
Error: Undefined function 'vettore' for input arguments of type 'double'. I want to save i value in the vettore array Thanks so much

Best Answer

it you don't have anything in vettore, then how can you perform the step vettore(i)=vettore(i)+1;
Related Question