not sure what this code mean.

1 Ansicht (letzte 30 Tage)
Moh
Moh am 5 Dez. 2022
Kommentiert: Image Analyst am 5 Dez. 2022
i looked evrey where to find what dose this code mean and i didnt understand it
u should mean modulation index
but s = c + u*m.*c; i have no idea what this means.
thank you
u = 0.5;
s = c + u*m.*c;
figure;
plot(t,s,'linewidth',2);grid on;xlabel('time');ylabel('Amplitude');
title('AM signal');
  2 Kommentare
Moh
Moh am 5 Dez. 2022
if someone could clarify this for me i would appreciate it
thank you
Voss
Voss am 5 Dez. 2022

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 5 Dez. 2022
Take m and multiply it element-by-element times c. Then multiply by 0.5 and add it in to the original c to get a new c.
Now you know the value of putting comments into your code. I'm sure you will now put comments into all your code and not make the mistake the original author did by writing code with no comments, assuming that everyone will know what he intended.
In fact @Steven Lord recommends that you write the comments first, and then add the code in afterwards.
The link below should clarify it:
To learn fundamental concepts, invest 2 hours of your time here:
  3 Kommentare
Moho Amr
Moho Amr am 5 Dez. 2022
Thank you I understand now
Image Analyst
Image Analyst am 5 Dez. 2022
@Voss thanks for the clarification.
@Moho Amr and/or @Moh, if we're done with the question, can you please click the "Accept this Answer" link? Thanks in advance. 🙂

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Historical Contests finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by