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

6 vues (au cours des 30 derniers jours)
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

Réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by