How to loop through all the rows of size using a for loop
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
while hasdata(ADS)
x = read(ADS);
%[x,Fs]=audioread('C:\Users\vvb\Documents\New\pan.wav');
sname='Sheet1';
startingColumn='A';
filename = 'C:\Users\vvb\Documents\local.xlsx';
% if P=8, it means 8 neighbours and 1 reference sample. total frame size
% will be 9 in this case
% x=x1(1:27,1);
thresh = 0.0003;
P=8; % no of neighbours for computation
% thresh=0.01; % in future take this value in INPUT
b_right=zeros(1,4); % variables for computing differnces on sides
b_left=b_right;
[row,c]=size(x); % total number of samples is "row"
total_frames=row/9;% number of total frames as 1 Frames=9 samples
% so total frames = total samples/ frame size
% full_frame=zeros(9,500);
k=1;
i=5;
aa=rem(row,P+1); % in this case P+1=9;
last_index=row-aa;
Here I want to create a for loop that will go from 1 to size of 'x'. In each iteration it will retrieve the values containing in size(x) one by one and store in a variable name 'check' from 1 to size x. What I mean to say is that every value of the row from the size(x) function will be retrived and store in the check function. for example first value of row is retrived and stored in check function. next time the loop will check for second value and so on.
for ii=1:size(x)
Numberofrows(ii)=ii;
check=Numberofrows;
end
I have written this code for it but its not retrieving any values of x.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Audio I/O and Waveform Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!