.claude/skills/chebfun-root-finding-extrema/SKILL.md
Find all zeros (roots) of a chebfun object using the Boyd-Battles method, and identify local minima and maxima without explicitly computing derivatives. Use when you need to locate all function zeros in a domain, find intersections of curves, or identify local extrema of smooth and non-smooth functions.
npx skillsauth add ShaneLogic/SolarLab chebfun-root-finding-extremaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find all zeros of a chebfun in its region of definition.
roots_vector = roots(f)
Default behavior: Includes roots at jumps for piecewise functions.
Omit jump roots:
genuine_roots = roots(f, 'nojump')
Find intersections of curves:
g = chebfun('cos(x)')
intersection_points = roots(f - g)
Find local minima and maxima without explicitly computing derivatives.
% Find local minima
[min_points, min_values] = min(f, 'local')
% Find local maxima
[max_points, max_values] = max(f, 'local')
The command returns:
Extrema located by finding zeros of the derivative.
Non-smooth extrema identified at points where:
f = chebfun('sin(x) + 0.5*cos(3*x)', [0, 2*pi])
[local_mins, min_vals] = min(f, 'local')
[local_maxs, max_vals] = max(f, 'local')
plot(f)
hold on
plot(local_mins, min_vals, 'ro')
plot(local_maxs, max_vals, 'go')
development
Understand and comply with Driftfusion software licensing terms, including the open-source AGPL v3.0 frontend and proprietary MATLAB pdepe solver backend. Use when using, modifying, or distributing Driftfusion code.
development
Initialize the Driftfusion simulation environment and create parameter objects. Use this skill when starting a new MATLAB session or setting up device properties for simulation.
development
Define device layer structure, configure spatial and time meshes, and build device structures with interface grading. Use this skill when setting up the physical geometry and discretization of a simulation device.
research
Analyze simulation solutions, calculate physical quantities, and generate plots. Use this skill when processing completed simulations, extracting currents/densities, or visualizing results.