フィルターのクリア

Extracting Data for Sound Generation

1 回表示 (過去 30 日間)
Arjun Tandon
Arjun Tandon 2020 年 5 月 16 日
I'm trying to extract data from a large file and play it as a sound. I've written up a code that resembles the data I'm dealing with, but I'm not sure how I can extract the data.
%Creates three abitrary matrices (resembles the data I'm working with)
for i = 1:100
for j = 1:100
A(i,j) = sin(i*j);
B(i,j) = cos(i*j);
for k = 1:10
C(i,j,k) = i+j+k;
end
end
end
%Normalizes the data
Astar = A/(abs(A));
Bstar = B/(abs(B));
%% Plotting
surf(Astar,Bstar);
xlabel('x')
ylabel('y')
zlabel('z');
colormap('parula');
The plotting (below) lets me see the data as in 3D environment (essentially the waveform as it varies in time), and I'm trying take the data on the planes x=1, 2, 3, 4... and collapse them into a single plane (e.g. x = 0) so I can take the data (which should be 2D now) and run it through my sound-producing code. (

回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by