Coding infinite many series ?

13 views (last 30 days)
Arzu Ahmadova
Arzu Ahmadova on 28 May 2019
Commented: Walter Roberson on 1 Jun 2019
clc
close all
alpha=1/2;
beta=1/3;
T=1;
t=0:T;
a=2; %x1^0
b=1; %x2^0
a11=1;
a12=2;
a21=3;
a22=4;
for (k=0:'k<K':k++)
l=2*k+2;
A=zeros(:,l);
for (j=1: j<J; j++)
x=0;y=0;p=0;q=0;
for (i=0: i<k: i++)
x=x+alpha*A[2*i+1]+ beta*A[2*i];
y=y+alpha*A[2*i+1]+ beta*A[2*i+2]};
p=p+(a11^sum_odd[A]*a22^sum_even[A]*t^(x+k*(alpha+beta)))/gamma(x+k*(alpha+beta)+1);
q=q+(a11^sum_odd[A]*a22^sum_even[A]*t^(y+(k+1)*(alpha+beta)+k*beta)))/gamma(y+(k+1)*(alpha+beta)+k*beta+1);
for n=1; n<=l; n++
A[n]=j
function f=mydouble(sum_odd[A]+sum_even[A])
f.value=A;
end
function update(A)
end
x1(t)=a*a12^k.*a21^k.*p+b*a12^(k+1).*a21^k*q;
end
end
end
end
  1 Comment
Walter Roberson
Walter Roberson on 1 Jun 2019
Your for loops have the wrong syntax.
Note: MATLAB does not have any ++ operator either.

Sign in to comment.

Answers (0)

Categories

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

Community Treasure Hunt

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

Start Hunting!