can someone help me run this

1 回表示 (過去 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 Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by