setting minimum length (dimension) to chebop preferences to solve a BVP-ODE
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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:
- How is chebop.pref and chebfun.pref different, since both of these seems to be working in above code?
- How can I set a minimum length in the preferences?
0 Kommentare
Antworten (1)
arushi
am 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
0 Kommentare
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!