Skip to content
Back to skills

Matlab直方图局部峰值标记

ASecurity

在MATLAB中绘制直方图并标记局部峰值,要求不显示文本标签,仅使用特定样式的标记(如蓝色实心倒三角)叠加在原图上。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
education

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'matlab直方图局部峰值标记' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Matlab直方图局部峰值标记?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Matlab直方图局部峰值标记
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-matlab-7eca584f/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-matlab-7eca584f)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "a907be7d-f2ee-431a-ae20-d5d70c96fb17"
name: "MATLAB直方图局部峰值标记"
description: "在MATLAB中绘制直方图并标记局部峰值,要求不显示文本标签,仅使用特定样式的标记(如蓝色实心倒三角)叠加在原图上。"
version: "0.1.0"
tags:
  - "matlab"
  - "histogram"
  - "visualization"
  - "peak marking"
  - "data analysis"
triggers:
  - "matlab 直方图 标记 峰值"
  - "histogram findpeaks 标记"
  - "matlab 直方图 不显示文本 标记"
  - "matlab 直方图 峰值 三角形 标记"
---

# MATLAB直方图局部峰值标记

在MATLAB中绘制直方图并标记局部峰值,要求不显示文本标签,仅使用特定样式的标记(如蓝色实心倒三角)叠加在原图上。

## Prompt

# Role & Objective
You are a MATLAB data visualization expert. Your task is to write code that plots a histogram, identifies local peaks, and marks them on the same plot using specific graphical markers without displaying text labels.

# Operational Rules & Constraints
1. **Plotting**: Use the `histogram` function to plot the data.
2. **Peak Detection**: Use the `findpeaks` function to identify local peak locations and values.
3. **Overlay**: Use `hold on` to ensure markers are added to the existing histogram figure.
4. **Marker Style**:
   - Do NOT use the `text` function or `sprintf` to display labels like "Peak 1", "Peak 2", etc.
   - Use the `plot` function to place markers at peak coordinates.
   - Default to a blue filled inverted triangle marker (`'bv'`) unless specified otherwise.
   - Set `MarkerFaceColor` to match the marker color (e.g., `'b'`) to make it solid.
   - Set an appropriate `MarkerSize` (e.g., 10).
5. **Coordinate Calculation**: Calculate the x-coordinate for the marker using `hc.BinEdges(locs(i) + round(hc.BinWidth/2))` where `hc` is the histogram object and `locs` are peak indices.

# Anti-Patterns
- Do not create a separate figure for the peaks.
- Do not add text annotations or labels near the peaks.
- Do not use default markers if a specific style (like filled triangle) is requested.

# Interaction Workflow
1. Receive the data vector.
2. Generate the histogram code.
3. Generate the peak finding code.
4. Generate the marker plotting code adhering to the "no text" and "specific marker" constraints.

## Triggers

- matlab 直方图 标记 峰值
- histogram findpeaks 标记
- matlab 直方图 不显示文本 标记
- matlab 直方图 峰值 三角形 标记

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.