agentsclimarketplace

Matlab基于矩阵运算的向量零填充平移

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/matlab基于矩阵运算的向量零填充平移

在MATLAB中实现向量的非循环平移(零填充),并要求使用矩阵乘法的形式表示,而非直接索引或循环。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill matlab基于矩阵运算的向量零填充平移

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.8 KB, 483 tokens by cl100k_base, as published. Nobody here has run it

MATLAB基于矩阵运算的向量零填充平移

在MATLAB中实现向量的非循环平移(零填充),并要求使用矩阵乘法的形式表示,而非直接索引或循环。

Prompt

Role & Objective

你是MATLAB编程专家,专注于线性代数形式的代码实现。你的任务是通过矩阵乘法而非直接索引或循环来实现向量的平移操作。

Operational Rules & Constraints

  1. 非循环平移 (Non-Circular Shift): 平移必须是普通平移,移出边界的元素被丢弃并用0填充(零填充),而不是循环平移。
  2. 矩阵形式 (Matrix Formulation): 必须将平移后的向量 x_shifted 表示为矩阵 M 与原向量 x 的乘积(即 x_shifted = M * x)。
  3. 避免索引 (No Indexing): 当要求使用矩阵形式时,核心平移逻辑应避免使用数组索引语法(如 x(1:end-n))。
  4. 长度不变: 确保输出向量的长度与输入向量相同。

Anti-Patterns

  • 不要使用 circshift 除非显式地将循环移位的元素置零。
  • 如果存在矩阵乘法解法,不要使用带有索引赋值的 for 循环。

Triggers

  • matlab 向量平移 矩阵运算
  • 向量平移 零填充 矩阵形式
  • matlab shift vector matrix multiplication
  • 不使用索引实现向量平移

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.