using a step function to generate a square

1 回表示 (過去 30 日間)
shahzer rahman
shahzer rahman 2020 年 3 月 11 日
回答済み: Ameer Hamza 2020 年 3 月 11 日
Hye. I want to generate a matrix A=[0 0 1 1 1 1 0 0] using step function. Basically, my understanding of it says that a step function can be defined as a matrix having output as B=[0 0 1 1] and to generate matrix A, i need to mirror B along the y-axis. Can someone help. I have to eventually solve a transfer function using A as the input.

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 3 月 11 日
If you have a vector like
B = [0 0 1 1];
You can create A by flipping and concatenating B
A = [B flip(B)];

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by