Running this problem an error occurs: ??? Error using ==> rem Not enough input arguments.
Show older comments
clear all;
clc;
N=20;
if (rem(N,2)==0)
for n= 1:(N+1)/2
b(n)=(2*n)/N;
end
for n=(N/2)+1:N
b(n)=(2*(N-n+1)/N);
end
else
for n= 1:(N+1)/2;
b(n)=(2*n)/(N+1);
end
for n=(N+1)/2:N
b(n)=(2*(N-n+1)/(N+1));
end
plot(b)
xlabel('time samples')
ylabel('amplitude')
title('triangular window')
end
Accepted Answer
More Answers (2)
Chandrasekhar
on 3 Aug 2013
there are syntax errors in the code. there is no end for the if else statement and no end for the second for loop
clear all;
clc; N=20;
if (rem(N,2)==0)
for n= 1:(N+1)/2
b(n)=(2*n)/N;
end
for n=(N/2)+1:N
b(n)=(2*(N-n+1)/N);
end
else
for n= 1:(N+1)/2;
end
end
1 Comment
Azzi Abdelmalek
on 3 Aug 2013
Edited: Azzi Abdelmalek
on 3 Aug 2013
Type and show the result
which rem
Or check in your current folder if there is a function named rem
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!