Multiplication of two arrays with different size

11 visualizaciones (últimos 30 días)
Cladio Andrea
Cladio Andrea el 15 de En. de 2015
Respondida: Star Strider el 15 de En. de 2015
I have two arrays one is 200x2 always remains same after simulation, and then i have another array that changes after simulation, lets say 190x4, but always less than 200 rows.. Now what i want to do is at that point. I have just ones and zeros for the fixed length array and there are some huge numbers inside the second array, after simulation i have to find a way for multiplication just for the first rows of each lia(:,1).*(data(:,1)) but the size doesn't match. Any ideas?

Respuestas (1)

Star Strider
Star Strider el 15 de En. de 2015
I would consider interpolating the shorter array using the interp1 function to make it have a length of 200. You would not have to extrapolate, and you would likely not lose much accuracy if your data in the smaller array were relatively smooth. You could then do your multiplication.

Categorías

Más información sobre Multidimensional 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!

Translated by