フィルターのクリア

Writing math formula into the matlab

1 回表示 (過去 30 日間)
hamed
hamed 2016 年 7 月 19 日
コメント済み: Thorsten 2016 年 7 月 19 日
I try to write the below formula:
h=sum(H1(l*m)^r);
Is that true in your opinion?
Thanks for the help.
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2016 年 7 月 19 日
your question is not clear
hamed
hamed 2016 年 7 月 19 日
This is my H Matrix in another function, that I will use this function into the another function:
function [H1,c,s,path,d,m]=topology1(topo) if (strcmp(topo,'access')) % This is for access-core H=zeros(24,18,3); H1=zeros(size(H,1),size(H,2),3); H1(:,:,1) = H(:,:,1);
So, I use the above function in below function:
function TrumpNew(topo,w) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This program solves the problem of Utility-Exp_cost with Trump by He et. % Today is 27 ,July %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [H1,c,ms,path]=topology1(topo); [l,r,m]=size(H1); maxc=max(c);
beta_p=1e-4; gamma=0.1; z1=(maxc/r)*ones(r,1); % initial the flow rate y=H1*z1; % initial the efficent capacity for the link / Why we don't z2=zeros(r,1); h=sum(H1(l*m)^r);
Cheers

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

採用された回答

Thorsten
Thorsten 2016 年 7 月 19 日
It depends on the context, but your code is probably wrong. You have some variable H that seems to vary according to i, l and j. If you have set up your H such that l varies along a column, you can write
h = sum(H)
where j and l could are varying along the 2nd and 3rd dimension.
  2 件のコメント
hamed
hamed 2016 年 7 月 19 日
Thanks a lot for your answer. Actually, the H matrix is:
[l,r,m]=size(H1);
Which, I want to map r as i and m as j. In this case, could it be written as you have mentioned?
Cheers
Thorsten
Thorsten 2016 年 7 月 19 日
Yes. sum sums over the first dimension, which is l in your case. And that's what the formula says.
BTW:
S = sum(X,DIM) sums along the dimension DIM.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by