I need to extract rows from the big matrix 'k' and store it in different matrix using 'for' loop?

function y=Mid_terms(x)
format long;
m=1;
n=1;
N=length(x);
for i=4:N-4
for j=i-3:i+3
for k=0:10
F(m)=((x(j)-x(i))^(k))/(factorial(k));
y(n)=F(m);
m=m+1;
n=n+1;
end
end
end
k=reshape(y,[28,121]);
b=[0;0;1;0;0;0;0;0;0;0;0];

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Asked:

on 7 May 2022

Commented:

dpb
on 7 May 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!