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 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by