can someone help me run this
Show older comments
%
clear;
clc;
format long g
syms c0 c1 c2 c3 t r0 r1 r2 r3
c0=0; c1=1/3; c2=2/3; c3=1; r0=0; r1=1; r2=2; r3=3;
EvalAt = [c0, c1, c2, c3];
ktemp = arrayfun(@(EA) euler([r0, r1, r2, r3], EA).', EvalAt, 'uniform', 0);
ptemp=arrayfun(@(EA) int(euler([r0, r1, r2, r3],t), 0,EA).', EvalAt, 'uniform', 0);
E = horzcat(ktemp{:}).'
K = horzcat(ptemp{:}).'
Ek=E-K
Inv_Ek= inv(Ek)
F=[6*c0-3*c0^2;6*c1-3*c1^2;6*c2-3*c2^2;6*c3-3*c3^2]
C=inv(Ek)*F
%solusi aproximasinya
Ua=@(x)(C(1)*euler(0,x)+C(2)*euler(1,x)+C(3)*euler(2,x)+C(4)*euler(3,x))
uaa=[];
xx=[];
k=0;
for i=1:4
uaa(i)=Ua(k);
xx(i)=k;
k=k+.1;
end
uaa'
2 Comments
KSSV
on 7 May 2021
Whjat help you want? Code runs without any errors.
Relly Syam
on 7 May 2021
Answers (0)
Categories
Find more on MATLAB 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!