Skip to main content

chebfun-analysis

Compute global extrema (minimum and maximum values) and vector norms (1-norm and infinity-norm) of chebfun objects. Use when analyzing the behavior, bounds, or magnitude of functions represented as chebfuns.

Informações da origem

Repositório
ShaneLogic/SolarLab
Última atividade na origem
20 de março de 2026 às 07:55
Idioma detectado do SKILL.md
inglês
Estrelas
5
Forks
0

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Explorador de arquivos
2 arquivos

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
chebfun-analysis
description
Compute global extrema (minimum and maximum values) and vector norms (1-norm and infinity-norm) of chebfun objects. Use when analyzing the behavior, bounds, or magnitude of functions represented as chebfuns.
# Chebfun Analysis Operations ## Global Extrema ### Finding Minimum and Maximum Values ```matlab % Create chebfun f = chebfun(@(x) sin(x) + 0.1*x.^2, [-5, 5]); % Get global minimum value min_val = min(f); % Get global maximum value max_val = max(f); ``` ### Finding Both Value and Location ```matlab % Get minimum value and its location [min_val, min_pos] = min(f); % Get maximum value and its location [max_val, max_pos] = max(f); ``` ### How It Works Chebfun computes extrema by: 1. Evaluating f at all interval endpoints 2. Finding all zeros of the derivative f' 3. Evaluating f at these critical points 4. Selecting the global minimum/maximum ### Important Notes - Only **one** position is returned even if extrema occur at multiple points - Computing `min(f)` and `max(f)` separately is inefficient for large chebfuns - Each call independently computes derivative and finds its zeros ### Efficiency Tip For large chebfuns, use combined computation: ```matlab % Faster alternative (if available) [min_val, max_val, min_pos, max_pos] = minandmax(f); ``` ## Vector Norms ### 1-Norm (Integral of Absolute Value) ```matlab % Compute 1-norm one_norm = norm(f, 1); ``` - Definition: `||f||_1 = ∫ |f(x)| dx` - Chebfun computes by summing segments between zeros of f - At zeros of f, |f(x)| typically has discontinuous slope ### Infinity-Norm (Maximum Absolute Value) ```matlab % Compute infinity-norm inf_norm = norm(f, inf); ``` - Definition: `||f||_inf = max |f(x)|` - Computed as: `max(max(f), -min(f))` ### Comparison with Other Norms ```matlab % For single chebfuns, 2-norm equals Frobenius norm two_norm = norm(f, 2); fro_norm = norm(f, 'fro'); % two_norm == fro_norm for single chebfuns ``` **Note**: For quasimatrices, 2-norm and Frobenius norm differ. ## When to Use - Finding global bounds of a function - Locating extreme points of a function - Computing function magnitude measures - Analyzing function size for error estimation - Comparing function sizes in optimization
Ver no GitHub