How to index a variable value and assign it to an array?
조회 수: 15 (최근 30일)
이전 댓글 표시
I am a beginner in MatLab and I am trying to assign a variable value to an array.
Ex:
d1 = 579
y = array(d1)
I know I can just input the number into the array, but I want to extract the value from the variable just in case d1 changes.
댓글 수: 1
the cyclist
2020년 4월 16일
It seems that you are not just a beginner, but you have really spent almost no time learning even the most basic operations of MATLAB. I would recommend viewing a tutorial such as the MATLAB Onramp.
답변 (1개)
the cyclist
2020년 4월 16일
Do you mean simply
y = d1
If not, can you give a more specific example of the input and output you would expect (not just a pretend syntax that does not work)?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!