フィルターのクリア

can anybody tell the matlab code for summation of multiple numbers?

2 ビュー (過去 30 日間)
vinod kumar govindu
vinod kumar govindu 2016 年 10 月 24 日
コメント済み: Walter Roberson 2016 年 11 月 2 日
N=200
Rx1 contains amplitude ai1,phase bi1(where 1<=i<=N)
Rx2 contains amplitude ai2,phase bi2(where 1<=i<=N)
Rx3 contains amplitude ai3,phase bi3(where 1<=i<=N) then
I=summation(ai1cosbi1)(here i lies 1 to N)
Q=summation(ai1sinbi1)(here i lies 1 to N)
finally
G=I+jQ(j is imaginary)
  5 件のコメント
vinod kumar govindu
vinod kumar govindu 2016 年 11 月 2 日
i want to plot complex signal
R1=RR1+RR2+RR3;
I1=IR1+IR2+IR3;
t=(0:1:100);
J=sqrt(-1);
complexreturn=R1+J*I1;
Re=real(complexreturn);
Im=imag(complexreturn);
plot(Re,Im,t,complexreturn);
grid on;
xlabel('time');
ylabel('amplitude');
title('time series');
after doing this it showing error
Warning: Imaginary parts of complex X and/or Y arguments ignored > In G at 114
help me to solve this?
Walter Roberson
Walter Roberson 2016 年 11 月 2 日
You have
plot(Re,Im,t,complexreturn);
which is equivalent to two plots combined
plot(Re,Im)
plot(t,complexreturn)
Re and Im are both real-valued so that part of the plot would be okay.
t is real-valued so that part is okay.
complexreturn was constructed as complexreturn=R1+J*I1; where J = sqrt(-1) . So complexreturn is complex. You cannot plot complex data, only the real or imaginary portions or the abs() value, or the angle()

サインインしてコメントする。

回答 (1 件)

Torsten
Torsten 2016 年 10 月 24 日
編集済み: Walter Roberson 2016 年 10 月 26 日

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by