how to write a function?
이전 댓글 표시
I have a matrix:
A= [0 80 -100 0 1 0 1 0 1 0 1 ;...
0 0 0 0 1 0 1 1 0 1 0 ;...
-100 0 0 0 1 1 0 0 1 0 1 ;...
-100 100 0 0 1 1 0 1 0 1 0 ;...
100 0 -100 1 0 0 1 0 1 0 1 ;...
100 0 0 1 0 0 1 1 0 1 0 ;...
0 0 0 1 0 1 0 0 1 0 1 ;...
0 100 0 1 0 1 0 1 0 1 0 ]
Now i need to make a function if i type:
0 1 0 1 0 1 0 1
then it will show the corresponding total row. so, it'll show:
0 80 -100 0 1 0 1 0 1 0 1
But i don't know how to do. Can anyone please help me?
댓글 수: 4
madhan ravi
2019년 1월 24일
편집: madhan ravi
2019년 1월 24일
Which row corresponds and why???
Sky Scrapper
2019년 1월 24일
편집: Sky Scrapper
2019년 1월 24일
Star Strider
2019년 1월 24일
The result you want is simply the first row of ‘A’.
Is the argument vector you want to enter in your function some sort of code that the function has to interpret?
Sky Scrapper
2019년 1월 24일
편집: Sky Scrapper
2019년 1월 24일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!