Adding 2 matrices together in matlab, got errors instead
4 次查看(过去 30 天)
显示 更早的评论
Hello, I'm trying to add an existing matrix to another matrix, specifically i'm adding an additional column of numbers to another grid. I've tried multiple methods from matlab's suggestions but none worked and I keep getting "Dimensions of arrays being concatenated are not consistent."
For references:
a= [1 2; 3 4; 5 6]
b= [1;2;3]
My goal is to add "b" to the right side of "a" as an additional column of numbers without getting the error. If anyone can show me their input it'll be much appreciated!
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!