2D Matrix calculation
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi there,
Fairly new to neuron.
If A is a 1000x1 vector containing non-integer values,
B is a 1000x1 vector also containing non-integer values,
and x is a vector containing integers from 1-36
How would I best go about calculating the following 1000x36 matrix,C:
C(A,B,x) = A/x + B/x
Fyi A and B are changing in time, and values of x are points in space (along an x-axis). So im wanting to see how the values at each point in space are changing over time, with 1000 time samples.
So maybe it should be written like this instead:
C(t,x) = A(t)/x + B(t)/x
Many thanks
0 comentarios
Respuestas (1)
Star Strider
el 29 de Jun. de 2018
I would use bsxfun.
These produce the same result:
C1 = bsxfun(@mrdivide, A, x) + bsxfun(@mrdivide, B, x);
C2 = bsxfun(@rdivide, A, x) + bsxfun(@rdivide, B, x);
0 comentarios
Ver también
Categorías
Más información sobre Matrices and Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!