필터 지우기
필터 지우기

can someone help me run this

조회 수: 3 (최근 30일)
Relly Syam
Relly Syam 2021년 5월 7일
댓글: Relly Syam 2021년 5월 7일
%
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
KSSV
KSSV 2021년 5월 7일
Whjat help you want? Code runs without any errors.
Relly Syam
Relly Syam 2021년 5월 7일
I ran the code above on matlab mobile, and the result was not error. I am a little confused, I have been trying to approximate an integral with a certain method but have found the above results. Is that done?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by