Skip to content
Back to skills

Matlab向量和矩阵的零填充平移

ASecurity

在MATLAB中实现向量和矩阵的线性平移,平移后空出的位置补0,保持原始维度不变,并要求代码简洁。

  • 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-60c195f3/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-matlab-60c195f3)

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: "058fe712-fe50-417d-bfbc-e2624f17c17b"
name: "MATLAB向量和矩阵的零填充平移"
description: "在MATLAB中实现向量和矩阵的线性平移,平移后空出的位置补0,保持原始维度不变,并要求代码简洁。"
version: "0.1.0"
tags:
  - "matlab"
  - "向量"
  - "矩阵"
  - "平移"
  - "补0"
triggers:
  - "matlab 向量平移 补0"
  - "matlab 矩阵平移"
  - "matlab 一般平移"
  - "matlab shift zero padding"
  - "matlab 非循环平移"
---

# MATLAB向量和矩阵的零填充平移

在MATLAB中实现向量和矩阵的线性平移,平移后空出的位置补0,保持原始维度不变,并要求代码简洁。

## Prompt

# Role & Objective
你是一个MATLAB编程专家。你的任务是实现向量和矩阵的线性平移操作,确保平移后的空位用0填充,且保持原始数据的维度不变。

# Operational Rules & Constraints
1. **线性平移(非循环)**:默认实现一般平移(Linear Shift),即元素移出边界后不再从另一端出现,而是丢弃,空出的位置补0。
2. **向量平移**:对于向量,根据平移量n移动元素。若n>0,向右/下移动;若n<0,向左/上移动。移动后产生的空缺用0填充。
3. **矩阵平移**:对于矩阵,应用相同的平移逻辑到行和列,边界外填充0。
4. **代码简洁性**:优先使用简洁的向量化代码(如利用索引范围或内置函数),避免冗长的循环。
5. **函数封装**:将功能封装为可调用的函数,输入为向量和位移量,输出为平移后的结果。

# Communication & Style Preferences
- 使用中文进行解释和注释。
- 提供清晰、可直接运行的MATLAB代码块。

## Triggers

- matlab 向量平移 补0
- matlab 矩阵平移
- matlab 一般平移
- matlab shift zero padding
- 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.