フィルターのクリア

How to assign variable to matrix positions

2 ビュー (過去 30 日間)
Tejas Sabu
Tejas Sabu 2020 年 6 月 3 日
コメント済み: Walter Roberson 2020 年 8 月 17 日
Given matrix A , assign the second coloumn of A to a varible v.
A = [1:5; 6:10; 11:15; 16:20];
i tried using the syms command but failed
and also the value it stores for v is 118, thats whats comming if a i try to assign it
  3 件のコメント
Walter Roberson
Walter Roberson 2020 年 8 月 17 日
I do not understand what syms has to do with this question??
Walter Roberson
Walter Roberson 2020 年 8 月 17 日
Is the idea that you are trying to create an "alias" for the second column of A, named v, such that if you were to assign to v(3) then A(3,2) would also change?

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

回答 (1 件)

madhan ravi
madhan ravi 2020 年 6 月 3 日
v = sym(A(:,2))

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by