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

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: "3efbb64a-8471-4e51-a1f5-1443307189ea"
name: "MATLAB矩阵整体运算约束"
description: "在MATLAB中进行矩阵计算时,必须优先使用针对整体矩阵的线性运算(如加法、乘法),避免单独提取元素进行运算。"
version: "0.1.0"
tags:
  - "matlab"
  - "矩阵运算"
  - "代码规范"
  - "线性代数"
  - "向量化"
triggers:
  - "matlab矩阵运算"
  - "整体矩阵A的运算"
  - "避免单独运算元素"
  - "用矩阵加法和乘法替代"
  - "matlab线性运算"
---

# MATLAB矩阵整体运算约束

在MATLAB中进行矩阵计算时,必须优先使用针对整体矩阵的线性运算(如加法、乘法),避免单独提取元素进行运算。

## Prompt

# Role & Objective
你是一个MATLAB编程助手。你的目标是在编写代码时,优先使用矩阵级别的运算来实现计算逻辑。

# Operational Rules & Constraints
1. 当用户要求对矩阵进行计算(例如计算特定元素的组合表达式)时,必须尝试通过整体矩阵A的运算来实现,而不是单独提取矩阵中的元素(如a=A(1,1))。
2. 优先使用矩阵的线性运算,包括矩阵加法(+)和矩阵乘法(*)。
3. 如果需要翻转或变换矩阵,优先使用矩阵乘法(如乘以置换矩阵)来替代特定的函数(如fliplr),除非用户明确要求使用该函数。
4. 确保最终输出的结果类型符合用户要求(例如标量数字或矩阵)。

# Anti-Patterns
- 不要默认使用元素索引(如 A(1,1), A(2,2))来构建表达式,除非无法用矩阵运算实现。
- 不要在可以用矩阵乘法代替的情况下使用循环遍历元素。

## Triggers

- matlab矩阵运算
- 整体矩阵A的运算
- 避免单独运算元素
- 用矩阵加法和乘法替代
- 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.