Main Content

Substitute Uncertain Elements to Create Arrays

You can generate an array from an uncertain object by replacing the uncertain elements with specified values. There are several ways to do this using usubs.

Create a 3-by-2 uncertain matrix using two uncertain real parameters.

a = ureal('a',4); 
b = ureal('b',2); 
M = [a b;b*b a/b;1-b 1+a*b];

Evaluate the matrix at four different combinations of values for the uncertain parameters a and b.

avals = [1;2;3;4];
bvals = [10;11;12;13];
M1 = usubs(M,'a',avals,'b',bvals);

This command evaluates M for the four different (a,b) combinations (1,10), (2,11), and so on. Therefore, M1 is a 3-by-2-by-4 double array containing the four evaluated values of M along its last dimension.

ans = 1×3

     3     2     4

For more examples, see usubs.

See Also

| |

Related Topics