.claude/skills/complex-zero-pole-analysis/SKILL.md
Count zeros and poles of complex functions within closed regions using the argument principle, and locate specific zeros using Cauchy integrals. Use when analyzing the distribution of roots or finding precise locations of zeros in the complex plane.
npx skillsauth add ShaneLogic/SolarLab complex-zero-pole-analysisInstall 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.
For a function f(z) with no zeros or poles on the boundary:
% Define closed contour as chebfun z
z = chebfun(@(s) exp(1i*s), [0, 2*pi]); % Unit circle
% Define function f(z)
f = @(z) z.^3 - 1;
% Compute N = (Zeros - Poles)
N = sum((diff(f(z)) ./ f(z))) / (2 * 1i * pi);
This derives from the argument principle:
N - P = (1/2πi) ∮ (f'(z)/f(z)) dz
If f has no poles, N is the exact count of zeros.
% Compute argument change along contour
arg_vals = angle(f(z));
arg_change = unwrap(arg_vals(end)) - unwrap(arg_vals(1));
N = arg_change / (2 * pi);
For a contour enclosing a single zero:
% Define contour enclosing region of interest
z = chebfun(@(s) 0.5 + 0.5*exp(1i*s), [0, 2*pi]);
% Define function with zero inside
f = @(z) z.^2 - 1;
% Compute zero location
z0 = sum(z .* (diff(f(z)) ./ f(z))) / (2 * 1i * pi);
% Check result
f(z0) % Should be ~0
% Compare with standard root finding
roots(f) % Should include z0
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.