Creation of matrix using lower triangular matrix?

12 ビュー (過去 30 日間)
ET-TAOUSSI mehdi
ET-TAOUSSI mehdi 2016 年 5 月 10 日
コメント済み: Guillaume 2016 年 5 月 11 日
Hi everybody. I have a power system that gives me the vector B (containing active P and reactive power Q), and I want to get the vector S (S = A * B) as described in the figure below. Note that the vector B should not be modified. I have already used a lower triangular matrix (in A) but I trouble linking the two powers (P, Q) to obtain the apparent power as is described in the vector S.

回答 (1 件)

Guillaume
Guillaume 2016 年 5 月 10 日
編集済み: Guillaume 2016 年 5 月 10 日
I don't understand what is going in with A but the S as described is:
S = cumsum(hypot(B(1:2:end), B(2:2:end)))
  3 件のコメント
ET-TAOUSSI mehdi
ET-TAOUSSI mehdi 2016 年 5 月 10 日
The vector B contains other elements that are marked by black points. please the Vector B should not be modified and vector A can contain only null and unit matrices.
Guillaume
Guillaume 2016 年 5 月 11 日
Well, A*B (let's call it T) is the sum of the Pi and Qi. Tn = ∑1...n Pi+Qi, whereas you want Sn = ∑1...n sqrt(Pi^2+Qi^2). You can't express S solely in term of T so what you're asking is not possible.
Now that I understand what A is about, this is how I would do it:
PQ = B(logical(A(end, :)); %Extract P and Q from B
S = cumsum(hypot(PQ(1:2:end), PQ(2:2:end)))
No matter what you do, you will need a way to identify the Ps from the Qs in order to calculate your S. In the above I assume they alternate. If they don't, you'll have to create two different A matrices.

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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by