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!