フィルターのクリア

HELP!!! how to deal with x(i,j,k,l)​.*y(j,k,l)​.*d(j,k)

3 ビュー (過去 30 日間)
Qiandong Dong
Qiandong Dong 2019 年 11 月 6 日
回答済み: Qiandong Dong 2019 年 11 月 6 日
my function contains some high dimonsional matrix:how to deal with x(i,j,k,l).*y(j,k,l).*d(j,k)?
and matlab warnings a argument must be numeric.
  2 件のコメント
Guillaume
Guillaume 2019 年 11 月 6 日
You need to give a lot more context to your question if you want help.
I suspect that you're doing your multiplication inside a loop, so show us the code of that loop. Also give us the size and class of x, y and d.
And if you get an error, give us the full text of the error message.
Qiandong Dong
Qiandong Dong 2019 年 11 月 6 日
P=10;
F=5;
W=5;
T=3;
x = optimvar('x',P,F,W,T,'LowerBound',0);
y = optimvar('y',F,W,T,'Type','integer','LowerBound',0,'UpperBound',1);
dist =optimvar('dist',F,W,'LowerBound',0);
c=0;
for t=1:T
for p=1:P
for f=1:F
for w=1:W
c = c+ dist(f,w).*x(p,f,w,t).*y(f,w,t);
end
end
end
end
错误使用 optim.internal.problemdef.Times.getTimesOperator
At least one argument must be numeric.
出错 .*

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

採用された回答

Qiandong Dong
Qiandong Dong 2019 年 11 月 6 日
I see. U cannot times variable(sign) matrix. But how to express large-scale nonlinear function in matlab?

その他の回答 (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