how can i multiply two large arrays of different sizes?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Chunru
am 6 Aug. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!