Untitled
% multiplyMatrices.m function result = multiplyMatrices(A, B) % Ensure A and B are on GPU A_gpu = gpuArray(A); B_gpu = gpuArray(B); % Multiply matrices on GPU result_gpu = A_gpu * B_gpu; % Gather the result back to CPU result = gather(result_gpu); end