trying to use integral transform to multiple large arrays but getting an error about array being too large to calculate

2 views (last 30 days)
i'm trying to take the data of x, which is an 88000x1 audio file, and multiply it with my kernal (k) ,which is a 1x15001 array but i keep recieving this error :
Requested 88000x15001 (19.7GB) array exceeds maximum array size preference (15.9GB). This might cause MATLAB to become unresponsive.
which then doesn't allow me to run the code, is there a way to fix my code so that i can get these values?
my origional integral transform equation is 𝑋(Ω) = integral (-inf,inf) of 𝑥(𝑡)*(𝑡,Ω)* dt which i'm trying to convert into a reiman sum to get the value of but i can't get past the step of finding my value for v.
thanks for any help. if you have any questions feel free to ask.
function x = math()
load baseball.mat;
x = record;
prompt2 = ' set a value for 𝜎 , should ne non-negative real number: ';
v = input(prompt2);
sigma = v;
omega = (0:2*pi:30000*pi);
z = sigma + 1i.*omega;
t = 1/44000;
k = exp(-z*t);
v = x.*k;
% S= sum(v);
%
% dt = 1/44000;
%
% X = dt*S;

Answers (1)

darova
darova on 2 Aug 2021
Maybe you need just interpolate the data to make the same size
% x data with 88000 elements
t1 = linspace(1,88000,15001); % new timespan
x1 = interp1(1:88000,x1,t1); % new vector
y1 = k.*x1; % multiply kernel by x dat
  1 Comment
david Price
david Price on 2 Aug 2021
sorry but i don't think this will work since you seem to be changing the timestamp and creating an entirely new x vector.
not sure if it matters but my sample rate has to be 44,000 and my x value is also set as a recorded audio at that sample rate for 2 seconds. so i cant change those values.
thanks for this interesting idea though trying it at least showed me some new information.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!