plug elements of matrices into formula

4 visualizaciones (últimos 30 días)
Roisin Loughnane
Roisin Loughnane el 27 de Sept. de 2017
Respondida: KSSV el 28 de Sept. de 2017
Hello all,
I have a a few matrices: A, B, and C, all of the same size.
I would like to access each corresponding element to use separately as input in a specified formula:
V = exp(x(A) + y*(B) -z*(C)
and then save resulting values in a new matrix (of the same size as input matrices)
Can somebody explain how to do this please?

Respuestas (1)

KSSV
KSSV el 28 de Sept. de 2017
N = 3 ;
A = rand(N) ;
B = rand(N) ;
C = rand(N) ;
%
x = rand ; y= rand ; z = rand ;
V = exp(x*A + y*B -z*C) ;

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by