prog.c:1:9: warning: character constant too long for its type
fprintf('Thiết kế bộ lọc thông cao dùng phương pháp bình phương tối thiểu \n');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:1:9: error: expected declaration specifiers or ‘...’ before '\x8375200a'
prog.c:2:9: warning: character constant too long for its type
fprintf('Nhập thông số bộ lọc \n');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:2:9: error: expected declaration specifiers or ‘...’ before '\x8d63200a'
prog.c:3:1: warning: data definition has no type or storage class
fs = input('Tần số lấy mẫu: ');
^~
prog.c:3:1: warning: type defaults to ‘int’ in declaration of ‘fs’ [-Wimplicit-int]
prog.c:3:6: warning: implicit declaration of function ‘input’ [-Wimplicit-function-declaration]
fs = input('Tần số lấy mẫu: ');
^~~~~
prog.c:3:12: warning: character constant too long for its type
fs = input('Tần số lấy mẫu: ');
^~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:3:6: error: initializer element is not constant
fs = input('Tần số lấy mẫu: ');
^~~~~
prog.c:4:1: warning: data definition has no type or storage class
t_start = input('Thời gian bắt đầu: ');
^~~~~~~
prog.c:4:1: warning: type defaults to ‘int’ in declaration of ‘t_start’ [-Wimplicit-int]
prog.c:4:17: warning: character constant too long for its type
t_start = input('Thời gian bắt đầu: ');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:4:11: error: initializer element is not constant
t_start = input('Thời gian bắt đầu: ');
^~~~~
prog.c:5:1: warning: data definition has no type or storage class
t_end = input('Thời gian kết thúc: ');
^~~~~
prog.c:5:1: warning: type defaults to ‘int’ in declaration of ‘t_end’ [-Wimplicit-int]
prog.c:5:15: warning: character constant too long for its type
t_end = input('Thời gian kết thúc: ');
^~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:5:9: error: initializer element is not constant
t_end = input('Thời gian kết thúc: ');
^~~~~
prog.c:6:1: warning: data definition has no type or storage class
t = t_start:1/fs:t_end;
^
prog.c:6:1: warning: type defaults to ‘int’ in declaration of ‘t’ [-Wimplicit-int]
prog.c:6:5: error: initializer element is not constant
t = t_start:1/fs:t_end;
^~~~~~~
prog.c:6:12: error: expected ‘,’ or ‘;’ before ‘:’ token
t = t_start:1/fs:t_end;
^
prog.c:7:1: warning: data definition has no type or storage class
f = input('Tần số của tín hiệu sin: ');
^
prog.c:7:1: warning: type defaults to ‘int’ in declaration of ‘f’ [-Wimplicit-int]
prog.c:7:11: warning: character constant too long for its type
f = input('Tần số của tín hiệu sin: ');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:7:5: error: initializer element is not constant
f = input('Tần số của tín hiệu sin: ');
^~~~~
prog.c:8:1: warning: data definition has no type or storage class
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:1: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
prog.c:8:5: warning: implicit declaration of function ‘sin’ [-Wimplicit-function-declaration]
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^~~
prog.c:8:5: warning: incompatible implicit declaration of built-in function ‘sin’
prog.c:8:5: note: include ‘<math.h>’ or provide a declaration of ‘sin’
prog.c:1:1:
+#include <math.h>
fprintf('Thiết kế bộ lọc thông cao dùng phương pháp bình phương tối thiểu \n');
prog.c:8:5:
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^~~
prog.c:8:11: error: ‘pi’ undeclared here (not in a function)
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^~
prog.c:8:25: warning: implicit declaration of function ‘randn’ [-Wimplicit-function-declaration]
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^~~~~
prog.c:8:31: warning: implicit declaration of function ‘size’ [-Wimplicit-function-declaration]
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^~~~
prog.c:8:41: error: expected identifier or ‘(’ before ‘%’ token
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:44: error: stray ‘\303’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:45: error: stray ‘\255’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:50: error: stray ‘\341’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:51: error: stray ‘\273’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:52: error: stray ‘\207’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:60: error: stray ‘\341’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:61: error: stray ‘\273’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:62: error: stray ‘\233’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:68: error: stray ‘\341’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:69: error: stray ‘\273’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:8:70: error: stray ‘\205’ in program
x = sin(2*pi*f*t) + 0.5*randn(size(t)); % Tín hiệu sin với nhiễu
^
prog.c:9:18: warning: character constant too long for its type
num_taps = input('Độ dài của bộ lọc FIR/số lượng mẫu của hồi đáp FIR: ');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:10:1: warning: data definition has no type or storage class
cutoff = input('Tần số cắt: ');
^~~~~~
prog.c:10:1: warning: type defaults to ‘int’ in declaration of ‘cutoff’ [-Wimplicit-int]
prog.c:10:16: warning: character constant too long for its type
cutoff = input('Tần số cắt: ');
^~~~~~~~~~~~~~~~~~~~
prog.c:10:10: error: initializer element is not constant
cutoff = input('Tần số cắt: ');
^~~~~
prog.c:11:1: error: expected identifier or ‘(’ before ‘%’ token
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:4: error: stray ‘\341’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:5: error: stray ‘\272’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:6: error: stray ‘\241’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:17: error: stray ‘\341’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:18: error: stray ‘\273’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:19: error: stray ‘\247’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:23: error: stray ‘\341’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:24: error: stray ‘\272’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:25: error: stray ‘\247’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:29: error: stray ‘\341’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:30: error: stray ‘\273’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:31: error: stray ‘\221’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:33: error: stray ‘\304’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:34: error: stray ‘\221’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:35: error: stray ‘\303’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:36: error: stray ‘\241’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:39: error: stray ‘\341’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:40: error: stray ‘\273’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:41: error: stray ‘\251’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:52: error: stray ‘\341’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:53: error: stray ‘\273’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:11:54: error: stray ‘\221’ in program
% Tạo vector của tần số đáp ứng mong muốn
^
prog.c:13:1: warning: data definition has no type or storage class
amp = [1, 1, 0, 0];
^~~
prog.c:13:1: warning: type defaults to ‘int’ in declaration of ‘amp’ [-Wimplicit-int]
prog.c:13:7: error: expected expression before ‘[’ token
amp = [1, 1, 0, 0];
^
prog.c:13:9: warning: left-hand operand of comma expression has no effect [-Wunused-value]
amp = [1, 1, 0, 0];
^
prog.c:13:12: warning: left-hand operand of comma expression has no effect [-Wunused-value]
amp = [1, 1, 0, 0];
^
prog.c:13:15: warning: left-hand operand of comma expression has no effect [-Wunused-value]
amp = [1, 1, 0, 0];
^
prog.c:15:1: error: expected identifier or ‘(’ before ‘%’ token
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:3: error: stray ‘\303’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:4: error: stray ‘\201’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:8: error: stray ‘\341’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:9: error: stray ‘\273’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:10: error: stray ‘\245’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:15: error: stray ‘\341’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:16: error: stray ‘\273’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:17: error: stray ‘\231’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:20: error: stray ‘\341’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:21: error: stray ‘\273’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:22: error: stray ‘\215’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:34: error: stray ‘\303’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:35: error: stray ‘\255’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:40: error: stray ‘\341’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:41: error: stray ‘\273’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:42: error: stray ‘\207’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:45: error: stray ‘\304’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:46: error: stray ‘\221’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:47: error: stray ‘\341’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:48: error: stray ‘\272’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:49: error: stray ‘\247’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:53: error: stray ‘\303’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:15:54: error: stray ‘\240’ in program
% Áp dụng bộ lọc FIR cho tín hiệu đầu vào
^
prog.c:16:22: error: expected identifier or ‘(’ before ‘%’ token
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:24: error: stray ‘\303’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:25: error: stray ‘\201’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:29: error: stray ‘\341’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:30: error: stray ‘\273’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:31: error: stray ‘\245’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:36: error: stray ‘\341’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:37: error: stray ‘\273’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:38: error: stray ‘\231’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:41: error: stray ‘\341’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:42: error: stray ‘\273’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:16:43: error: stray ‘\215’ in program
y = filter(b, 1, x); % Áp dụng bộ lọc FIR
^
prog.c:17:4: error: stray ‘\341’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:5: error: stray ‘\272’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:6: error: stray ‘\275’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:10: error: stray ‘\341’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:11: error: stray ‘\273’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:12: error: stray ‘\203’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:15: error: stray ‘\304’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:16: error: stray ‘\221’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:17: error: stray ‘\341’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:18: error: stray ‘\273’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:19: error: stray ‘\223’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:25: error: stray ‘\303’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:26: error: stray ‘\241’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:31: error: stray ‘\303’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:32: error: stray ‘\255’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:37: error: stray ‘\341’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:38: error: stray ‘\273’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:39: error: stray ‘\207’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:42: error: stray ‘\304’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:43: error: stray ‘\221’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:44: error: stray ‘\341’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:45: error: stray ‘\272’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:46: error: stray ‘\247’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:50: error: stray ‘\303’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:51: error: stray ‘\240’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:55: error: stray ‘\303’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:56: error: stray ‘\240’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:58: error: stray ‘\304’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:59: error: stray ‘\221’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:60: error: stray ‘\341’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:61: error: stray ‘\272’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:17:62: error: stray ‘\247’ in program
% Vẽ biểu đồ so sánh tín hiệu đầu vào và đầu ra
^
prog.c:19:9: error: expected declaration specifiers or ‘...’ before numeric constant
subplot(2, 1, 1);
^
prog.c:19:12: error: expected declaration specifiers or ‘...’ before numeric constant
subplot(2, 1, 1);
^
prog.c:19:15: error: expected declaration specifiers or ‘...’ before numeric constant
subplot(2, 1, 1);
^
prog.c:20:1: warning: data definition has no type or storage class
plot(t, x);
^~~~
prog.c:20:1: warning: type defaults to ‘int’ in declaration of ‘plot’ [-Wimplicit-int]
prog.c:20:1: warning: parameter names (without types) in function declaration
prog.c:21:7: warning: character constant too long for its type
title('Tín hiệu đầu vào');
^~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:21:7: error: expected declaration specifiers or ‘...’ before '\x76c3a06f'
prog.c:22:8: warning: character constant too long for its type
xlabel('Thời gian');
^~~~~~~~~~~~~
prog.c:22:8: error: expected declaration specifiers or ‘...’ before '\x6769616e'
prog.c:23:8: warning: character constant too long for its type
ylabel('Amplitude');
^~~~~~~~~~~
prog.c:23:8: error: expected declaration specifiers or ‘...’ before '\x74756465'
prog.c:24:9: error: expected declaration specifiers or ‘...’ before numeric constant
subplot(2, 1, 2);
^
prog.c:24:12: error: expected declaration specifiers or ‘...’ before numeric constant
subplot(2, 1, 2);
^
prog.c:24:15: error: expected declaration specifiers or ‘...’ before numeric constant
subplot(2, 1, 2);
^
prog.c:25:1: warning: data definition has no type or storage class
plot(t, y);
^~~~
prog.c:25:1: warning: type defaults to ‘int’ in declaration of ‘plot’ [-Wimplicit-int]
prog.c:25:1: warning: parameter names (without types) in function declaration
prog.c:26:7: warning: character constant too long for its type
title('Tín hiệu đầu ra sau khi lọc');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:26:7: error: expected declaration specifiers or ‘...’ before '\xe1bb8d63'
prog.c:27:8: warning: character constant too long for its type
xlabel('Thời gian');
^~~~~~~~~~~~~
prog.c:27:8: error: expected declaration specifiers or ‘...’ before '\x6769616e'
prog.c:28:8: warning: character constant too long for its type
ylabel('Amplitude');
^~~~~~~~~~~
prog.c:28:8: error: expected declaration specifiers or ‘...’ before '\x74756465'