I want to extract data from one table and move into another from specific location in the first table.
    8 views (last 30 days)
  
       Show older comments
    
I have created a code to compute the centered moving standard deviation of a data in a table, now I want to get the data starting from the 4th position to the last position with an increment of 5 between the positions. 
I wrote a code which is extracting the st dev from the table and then I created a table of the length of the number of data points I want to extract from the second table, but when I tried to put it into the second table the out was just zeros. 
Please help!
clear;
clc
close all;
T = readtable('NSEI1.csv');
T.Date = datetime(T.Date,'Format','dd-MM-uuuu');
M = movstd(T.Open,[3 1]); 
g=length(M)
f=round((g/5))+1;
h = zeros(f,1); 
for i=4:5:length(g)
  h=[h;M(i)];
end
disp(h);
The output of this is just a table of zeros please help!
1 Comment
  Hayden Raabe-Garmon
 on 16 Mar 2023
				% M = movstd(T.Open,[3 1]); 
M=[1:100] % just so I can test it without your CSV
g=length(M)
f=round((g/5))+1;
h=M(4:5:length(M))
Answers (1)
  Hayden Raabe-Garmon
 on 16 Mar 2023
        % M = movstd(T.Open,[3 1]); 
M=[1:100] % just so I can test it without your CSV
g=length(M)
f=round((g/5))+1;
h=M(4:5:length(M))
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
