Selection of 2 Dimensional variable Parameters in Sensitivity analyzer

1 回表示 (過去 30 日間)
NN
NN 2023 年 2 月 7 日
編集済み: Sachin 2023 年 2 月 16 日
Hi All,
How we can Select Parameters which are not scalar in Sensitivity analyzer.Mine is 2 dimensional array and have four such variables.
first column is time in seconds and second colmn shows the values.
Eg: Cost[60 19.9,120 19.88,....]
i tried the below formats:
Cost.Value(1,1)
Cost.Value[1 1]
but it didnt select the values from the 2 dimensional array.
Kindly help how to specify expression for that.

回答 (1 件)

Sachin
Sachin 2023 年 2 月 16 日
編集済み: Sachin 2023 年 2 月 16 日
Hi @NN,
As per my understanding, you are facing issue while selecting Parameters in Sensitivity Analyzer. Referring the following information might be of good help to you.
According to your Eg : Cost[60 19.9,120 19.88,....]
Looks like your array is not 2-D . To define Array correctly you need to add a semicolon(;) after 1st row. You need to change comma(,) with semicolon(;).
Correct way to define 2-D Array - Cost[60 19.9 ;120 19.88]
Refer the following page for more information about array and matrix -
You can also check this by generating sample parameter. For example -
R = param.Continuous('R',[60 19.9;120 19.88])
R = Name: 'R' Value: [2×2 double] Minimum: [2×2 double] Maximum: [2×2 double] Free: [2×2 logical] Scale: [2×2 double] Info: [2×2 struct] 1x1 param.Continuous
R.Value
ans = 2×2
60.0000 19.9000 120.0000 19.8800
R.Value(1,1)
ans = 60
isscalar(R.Value)
ans = logical
0
For more information Generate Parameter for Sensitivity Analysis, refer to the following page –
Regards
Sachin

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by