how can i make the initial value variable? this is the first problem. in my code, i used 'inline' to assign values to variable (t). However, the equation which is in the inline function was copied manualy. is it possible to do it automatically?
Ältere Kommentare anzeigen
clear all
clc
syms t y
y=dsolve('Dy-y=t^2','y(0)=1');
simplify(y)
y1=inline('3*exp(t) - 2*t - t^2 - 2','t')
t=-4;
sayici=0;
for i=1:7
t=t+1;
sayici=sayici+1;
b(sayici)=y1(t);
end
b
ezplot(y1,[-3 3])
xlabel('t [-3 3]');
ylabel('y');
grid on
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Function Creation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!