Practical MATLAB Modeling with Simulink by Sulaymon L. Eshkabilov
Author:Sulaymon L. Eshkabilov
Language: eng
Format: epub
ISBN: 9781484257999
Publisher: Apress
Example 1
Here is the example problem: .
with the initial condition . The given ODE can be rewritten in the form of an implicit differential equation expressed in Equation (8.44), as shown here:
Subsequently, this can also be expressed as follows:
and as follows:
Note that the expression of F(t, y, dy) = 0 is the main difference in defining F in implicit ODEs from explicit ones. In this example, the F function, containing three arguments (which are ), can be expressed via an anonymous function (@) directly. Here is the complete solution, called IMPLICIT_1ODE_EX1.m:% IMPLICIT_1ODE_EX1.m
%{
EXAMPLE 1. Problem: t^2*y'+t*(y')^2+2*cos(t)=1/y with ICs: y(0)=1/2;
Part 1.
The problem function is defined via function handle under name of Yin.
A new variable is introduced: dy=yp.
%}
clearvars; close all
Yin=@(t,y, yp)(t^2*yp+t*yp^2+2*cos(t)-1/y);
y0=1/2; yp0=0; % Initial conditions
[t, yt]=ode15i(Yin, [0, 6*pi], y0, yp0);
plot(t, yt, 'bo-')
title('\it Simulation of: $$ t^2*\frac{dy}{dt}+t*(\frac{dy}{dt})^2+2*cos(t)=y^{-1}, y_0=\frac{1}{2} $$', 'interpreter', 'latex')
grid on;
xlabel('\it t'),
ylabel( '\it Solution, y(t)'),
hold on
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8301)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6748)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6724)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6603)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6386)
Driving Data Quality with Data Contracts by Andrew Jones(6335)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6098)
Learning SQL by Alan Beaulieu(5995)
Weapons of Math Destruction by Cathy O'Neil(5779)
Big Data Analysis with Python by Ivan Marin(5368)
Data Engineering with dbt by Roberto Zagni(4366)
Solidity Programming Essentials by Ritesh Modi(4013)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3874)
Pandas Cookbook by Theodore Petrou(3583)
Blockchain Basics by Daniel Drescher(3294)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2906)
Feature Store for Machine Learning by Jayanth Kumar M J(2815)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2796)
Mastering Python for Finance by Unknown(2744)
