myCompiler myCompiler
Deutsch English Español Français Italiano 日本語 한국어 Nederlands Polski Português
Recent
Login Sign up
Recent
Login Sign up
C

@Charulatha

complex sinusoid

Octave
1 year ago
n = 0:15; x = exp(1j * 2 * pi * 0.1 * n); X = fft(x); figure; subplot(3,1,1); stem(n, real(x), 'r'); hold on; stem(n, imag(x), 'b');

fft magnitude and phase

Octave
1 year ago
n = 0:127; x = sin(2 * pi * 0.05 * n); X = fft(x); mag = abs(X); phase = angle(X); figure; subplot(3, 1, 1); plot(n, x, 'k', 'LineWidth', 1.5);

sampling and effect

Octave
1 year ago
f_continuous = 50; t_continuous = 0:1/1000:0.1; x_continuous = sin(2*pi*f_continuous*t_continuous); fs_high = 200; fs_low = 60; t_high = 0:1/fs_high:0.1; t_low = 0:1/fs_low:0.1; x_high = sin(2*pi*f_continuous*t_high); x_low = sin(2*pi*f_c

circular convolution

Octave
1 year ago
x = [1 2 3 4]; h = [1 2 1 0]; N = max(length(x), length(h)); x = [x, zeros(1, N - length(x))]; h = [h, zeros(1, N - length(h))]; X = fft(x); H = fft(h); Y = X .* H;

output sequence

Octave
1 year ago
x = [1 2 3 4]; h = [2 1 0]; y = conv(x, h); disp('Input Sequence x[n]:'); disp(x); disp('System Sequence h[n]:'); disp(h); disp('Output Sequence y[n]:'); disp(y); figure;

step,ramp,parabolic,sine

Octave
1 year ago
n = 0:20; step = ones(size(n)); ramp = n; parabolic = n.^2; sinusoidal = sin(0.2 * pi * n); figure; subplot(2,2,1); stem(n, step, 'r'); title('Step Function');

impulse,cosine,exp_dec,inc

Octave
1 year ago
n = -10:10; impulse = (n == 0); cosine = cos(0.5 * pi * n); exp_inc = exp(0.1 * n); exp_dec = exp(-0.1 * n); figure; subplot(2,2,1); stem(n, impulse, 'r'); title('Impulse');
Previous Next page

Supported languages

Deno JavaScript NodeJS Python Ruby Go C C++ Java C# TypeScript PHP Bash R Octave (MATLAB) Fortran Lua Erlang SQL MySQL MongoDB Clojure D Perl Kotlin Swift Rust Assembly
© 2026 mycompiler.io
Terms of service Privacy policy Contact us