looking for convoltion signal for output

Hi guys i need to find a matlab code which can take 2 inputs of 2 different signals and generates and y(t) signal. This y(t) signal must be a another signal. So I'm basicaly looking for a signal for output. This is soooo urgent.

5 Commenti

To be honest, I have no clue what you really want.
Let x and z be your signals. The solution is:
y = x;
If that doesn't satisfy your requirements, please tell us why not -- what requirements do you have for y that the solution above doesn't meet?
Alexander Hi!
inputs will be
ℎ(𝑡) = { 1, 0 < 𝑡 < 7 ; 0, other
𝑥(𝑡) = { 1, 0 < 𝑡 < 5 ; 0, other
and y(t) = x(t)*h(t)
the question is find the MATLAB code that will create the y(t) signal.
Okay, that sounds like a description of the problem you're trying to solve we can work with.
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
Steven Hi!
I haven't written any code because I don't have any clue about it and the worst thing is I have to deliver this project in 2 hours. So I hope you can help me? Please?

Accedi per commentare.

 Risposta accettata

Voss
Voss il 28 Mar 2024
Modificato: Voss il 28 Mar 2024
t = linspace(0,10,50);
x = zeros(size(t));
x(t > 0 & t < 5) = 1;
h = zeros(size(t));
h(t > 0 & t < 7) = 1;
y = conv(x,h,'same');
figure
subplot(3,1,1)
stem(t,x)
title('x[t]')
subplot(3,1,2)
stem(t,h)
title('h[t]')
subplot(3,1,3)
stem(t,y)
title('y[t] = x[t]*h[t]')

3 Commenti

Mehmet Eren Dikmen
Mehmet Eren Dikmen il 28 Mar 2024
Modificato: Mehmet Eren Dikmen il 28 Mar 2024
AMAZİNGGG !!!
THANK YOU VOSS YOU ARE MY SAVIOR...
Just one thing I need it for continous time not discrete time.
Mehmet Eren Dikmen
Mehmet Eren Dikmen il 28 Mar 2024
Modificato: Mehmet Eren Dikmen il 28 Mar 2024
Voss Hi again !
Thank you for that answer.
I have just one more question
ℎ[𝑛] = {1, 5 ≤ 𝑛 ≤ 15 ; 0, other
𝑥[𝑛] = {1, 0 ≤ 𝑛 < 21 ; 0, other
What about this one. Could you help me to find this one too?
As you see this is for discrete time.
Thanks Already
You're welcome!
To make them look like continuous-time signals, plot them with the plot function instead of the stem function. There is no difference other than that, unless you are using the Symbolic Math Toolbox.
For the second problem, approach it the same way I showed in my answer. You can use the colon operator to define n, like n = 0:25 or something, and define x and h in terms of n, as I did in terms of t. Adjust the conditions where x and h are 1 appropriately.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Programming in Centro assistenza e File Exchange

Prodotti

Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by