フィルターのクリア

How to assing all bounds for my variable in Range = repmat([0;10],1,Dim)?

1 回表示 (過去 30 日間)
Sadiq Akbar
Sadiq Akbar 2021 年 1 月 4 日
回答済み: Sadiq Akbar 2021 年 1 月 4 日
I have downloaded an algorithm from Mathworks site called "State Transition algorithm". In this algorithm there is a command "Range = repmat([0;10],1,Dim)" in which the range is from 0 to 10. I have four variables whose bounds are not equal. i.e. in my case lowerBounds=[0 0 0 0] and upperBounds=[10 10 pi pi] respectively. When I replace the given command by "Range = repmat([0 0 0 0;10 10 10 pi pi],1,Dim)", it gives me error. How to tackle this problem.

採用された回答

Sadiq Akbar
Sadiq Akbar 2021 年 1 月 4 日
I replaced the given command by:
Range = [repmat([0;10],1,Dim-4) repmat([0;pi],1,Dim-4)];
and it worked.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by