how can i assign values to symbolic matrix?
조회 수: 7 (최근 30일)
이전 댓글 표시
hi. I have the matrix B in symbolic form and I want to calculate it for different values and assign different symbols to it? what should I do?
>> syms theta_i Alpha_i a_i d_i
>> B =[cos(theta_i) -sin(theta_i)*cos(Alpha_i) sin(theta_i)*sin(Alpha_i) a_i*cos(theta_i);sin(theta_i) cos(theta_i)*cos(Alpha_i) -cos(theta_i)*sin(Alpha_i) a_i*sin(theta_i); 0 sin(Alpha_i) cos(Alpha_i) d_i;0 0 0 1];
there are 6 different set of values:
(d_1=d_1,Alph_1=pi/2 , a_1=0,theta_1=theta_1)
(d_2 , Alpha_2=0, a_2=a_2 ,theta_2)
댓글 수: 0
답변 (1개)
Walter Roberson
2018년 6월 22일
B1 = subs(B, {d_i, Alpha_i, a_i, theta_i}, {d_1, sym(pi)/2, 0, theta_1})
B2 = subs(B, {d_i, Alpha_i, a_i, theta_i}, {d_2, 0, a_2, theta_2})
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!