Page 1 of 1
Making parameter as index
Posted: Wed May 06, 2020 9:42 pm
by clar.tn
Hello,
so I have a parameter a(i) that is used in equations to find a variable b(i) and I want to make a table with datas from a(i) and b(i).
Is there a way to make for example a table called D(a(i), b(i))?
Re: Making parameter as index
Posted: Thu May 07, 2020 8:42 am
by Renger
Hi
I suppose you want the results as a table, then:
Code: Select all
parameter results(i,*) Results table;
results(i,"a") = A.L(i);
results(i,"b") = B.L(i);
display results;
Cheers
Renger
Re: Making parameter as index
Posted: Thu May 07, 2020 3:16 pm
by clar.tn
Hi Renger,
thanks! But what I'm trying to make is actually a table like a diagram with both axis that is a parameter or variable instead of set. Is there a way to make for example when a(1) is 0.1 then b(1) is 24, and when a(2) is 0.5 then b(2) is 28 in a table/diagram? (a is the x-axis and b is the y-axis) maybe like a function of b(a(i))?
Renger wrote: ↑4 years ago
Hi
I suppose you want the results as a table, then:
Code: Select all
parameter results(i,*) Results table;
results(i,"a") = A.L(i);
results(i,"b") = B.L(i);
display results;
Cheers
Renger