Effacer les filtres
Effacer les filtres

can someone help me run this

3 vues (au cours des 30 derniers jours)
Relly Syam
Relly Syam le 7 Mai 2021
Commenté : Relly Syam le 7 Mai 2021
%
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 commentaires
KSSV
KSSV le 7 Mai 2021
Whjat help you want? Code runs without any errors.
Relly Syam
Relly Syam le 7 Mai 2021
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?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by