How to assign variable to matrix positions

조회 수: 1 (최근 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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by