Extracting a Column from a Matrix

14 ビュー (過去 30 日間)
Ahmed
Ahmed 2013 年 2 月 10 日
what i have is a A, where size (A)=(i,12) where i changes as the input changes i want to extract from A a Certain column up to a certain row how i can do this ? Thx in Advance

採用された回答

Shashank Prasanna
Shashank Prasanna 2013 年 2 月 10 日
Example:
A = rand(200,12) % 200 rows and 12 columns
n = 50; % upto 50 rows
m = 5; % the column you want to extract, in this case the 5th
B = A(1:n,m);
You should find all these basics in the getting started guide, I urge you to go through them as it will save you a lot of time:
  1 件のコメント
Ahmed
Ahmed 2013 年 2 月 10 日
Thx :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by