ํ•„ํ„ฐ ์ง€์šฐ๊ธฐ
ํ•„ํ„ฐ ์ง€์šฐ๊ธฐ

writing convolution function in matlab?

์กฐํšŒ ์ˆ˜: 1 (์ตœ๊ทผ 30์ผ)
ABTJ
ABTJ 2020๋…„ 2์›” 22์ผ
๋Œ“๊ธ€: Matt J 2020๋…„ 2์›” 23์ผ
It is basically assignment. I have to make a MATLAB function to systematically develop the sequence y[n] generated by the convolution of the
two-finite length sequence x[n] and ?[?]. Program should be able to handle causal and non- casual sequences.
Program should call for the input sequences and their indices vectors .
Below is my code
function [ny,y ] = convolution(nx,x,nh,h )
%UNTITLED7 Summary of this function goes here
% Detailed explanation goes here
a=nx(1)+nh(1) %nx is time span of x and nh is time span of h
b=nx(length(x))+nh(length(h))
ny=[a:b]% ny is length of y
y=conv(x,h)
end
Please kindly guide me and correct me,if my code is not as per requirment/question?
  ๋Œ“๊ธ€ ์ˆ˜: 5
ABTJ
ABTJ 2020๋…„ 2์›” 23์ผ
What is meant by"indices vector" here?Is it meaning time indexes,which i have denoted by nh and nx in my function?
Matt J
Matt J 2020๋…„ 2์›” 23์ผ
That's a question for the person who gave you the assignment.

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

๋‹ต๋ณ€ (0๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Matched Filter and Ambiguity Function์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

์ œํ’ˆ


๋ฆด๋ฆฌ์Šค

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by