Clear Filters
Clear Filters

How do i combine two 2D matrices in one 3D matrix, where each 3D pixel represents the sum of two elements.

1 view (last 30 days)
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

Answers (0)

Categories

Find more on Resizing and Reshaping Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!