assigning a value using variables in a matrix
조회 수: 9 (최근 30일)
이전 댓글 표시
Hello! Is it possible to input any values using different variables in a matrix?
For example,
Load=[a1 b1 c1 d1 e1 f1 g1 h1 i1 j1 k1 l1 m1 n1 o1];
I would like to enter a value on each variable. Is it possible? Thanks
댓글 수: 3
Rik
2021년 10월 26일
Why do you want to do it like that? Why not define the entire matrix without using intermediate variables?
답변 (1개)
Abhishek Kolla
2021년 11월 1일
We can define variables seperately and then use them whenever required. The following code snippet can be referred which is similar to the formula you are referring to
a = 10;
b = [5 10 20];
c = [10 20 30];
d = [b c];
s = d/a;
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!