Clear Filters
Clear Filters

setting minimum length (dimension) to chebop preferences to solve a BVP-ODE

2 views (last 30 days)
I have a bvp-ode which I'm solving using chebyshev polynomial (chebop/chebfun). I want to increase the minimum length of the polynomial for the solution. I am using the code below to change the preferences but it is being bypassed and the output that I'm getting has length less than 200
cheboppref.setDefaults('minDimension',200)
To set a fixed length, the code below is working fine
chebfunpref.setDefaults('fixedLength',200)
The code where I need to apply these preferences is something like this:
function [ublasius, wblasius] = blasiusBL (Ug, infty)
%%%%Blasius Solution%%%%
Eq1 = chebop( @(x,u,v) [ diff(u,2) - v ; diff(v) + 1.5*u.*v ], [0, infty] );
Eq1.lbc = @(u,v) [ u ; diff(u)-1 ];
Eq1.rbc = @(u,v) diff(u)-Ug;
ublasius = Eq1 \ 0;
wblasius = diff(ublasius);
%%%%%%
end
I have two doubts here:
  1. How is chebop.pref and chebfun.pref different, since both of these seems to be working in above code?
  2. How can I set a minimum length in the preferences?

Answers (1)

arushi
arushi on 21 Nov 2023
Hi Soumya,
I understand that you want to increase the minimum length of the polynomial for the solution.The property minDimension is specific to cheboppref and is not available in chebfunpref. If you want to set a minimum length for the Chebyshev polynomials specifically for solving BVPs using cheboppref, you can use the following approach:
pref = cheboppref();
pref.minDimension = 200;
The cheboppref and chebfunpref are used to set preferences for different aspects of the Chebfun package in MATLAB.
cheboppref is used to set preferences specifically for solving boundary value problems (BVPs) using Chebyshev polynomials. It allows you to customize various options related to the solution of BVPs, such as tolerances, discretization, and other algorithmic choices.
chebfunpref, on the other hand, is used to set preferences for general Chebfun operations, such as function approximation, integration, and differentiation. It allows you to customize options related to the behavior of Chebfun objects, including how functions are represented and manipulated.
Hope this helps.
Thank you

Categories

Find more on Numerical Integration and Differential Equations in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!