Transfer elements from 1 matrix to another
古いコメントを表示
I have 2 matrices path one is path which is 6x2 and sample8 which is 3X3. I want to extract an element from sample8 and put it in path as shown below:
path(i,1)=sample8(1,1)
When I do this I get no change in path Please help
3 件のコメント
Geoff Hayes
2015 年 12 月 1 日
Ken - are you sure that this line of code is being executed? What happens if you put a breakpoint at this line and then run your code? When the debugger pauses at this line, look at the value for i, path before the update, sample8, and path after the update. Please describe the values for each of these two small matrices and perhaps include more of your code so that we can get an idea of what else is happening.
Ken
2015 年 12 月 1 日
編集済み: Walter Roberson
2015 年 12 月 1 日
Walter Roberson
2015 年 12 月 1 日
You are replacing a 1 with a 1. What output were you expecting?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Operating on Diagonal Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!