how can i multiply two large arrays of different sizes?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm trying to figure out how to get a value for k when I have two variables w and t that are of different sizes.
sigma = 0 %can set sigma to any positive integer number but choosing 0 to simplify things for now
w = (0:2*pi:30000*pi) % required parameters
z = sigma + 1i.*w %gives me a complex array of 1x15001 using the values of w above.
dt=1/44000; %my sample rate is 44000
t = 0:dt:2 %gives me an array of 1x88001
k = exp(-z.*t); %this is where my problem comes in because i can't multiply two arrays of different sizes
0 comentarios
Respuestas (1)
Chunru
el 6 de Ag. de 2021
sigma = 0 %can set sigma to any positive integer number but choosing 0 to simplify things for now
w = (0:2*pi:10*pi) % required parameters (small value for illustration)
z = sigma + 1i.*w %gives me a complex array of 1x15001 using the values of w above.
dt=1/44000; %my sample rate is 44000
t = 0:dt:4*dt; %gives me an array of 1x88001 (smaller size)
% k is a matrix k(i_z, i_t). I guess this is what you want
k = exp(-z.'*t)
0 comentarios
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices 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!