How do i combine two 2D matrices in one 3D matrix, where each 3D pixel represents the sum of two elements.
1 次查看(过去 30 天)
显示 更早的评论
I am trying to create a 3D matrix that calculates all of the elements the following equation:
x*cos(theta)+y*sin(theta)
I have vectors of x, y, cos, & sin and also a 2D matrices of the two terms before addition. My question is how can I create a 3d matrix that contains all of the possible combinations for my four vectors. It should be a 3D matrix because the thetas are the same.
edit: the goal is to do this without using a for loop
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!