Q:

Store formulas as an element of an array in Matlab

(* I don't know programming in Matlab. It is just a general question about Matlab language. *)
In Excel, we can store a formula in a cell. For instance, if A2 contains a formula = A1+10, the re-evaluation of A2 returns 30 when the value of A1 is 20.
My question is, is there a similar mechanism in matlab? That said, can we specify a formula in a element of an array in Matlab, so that we can re-evaluate the array later?
Edit 1:
Following the comment of @rayryeng I try to make an example to illustrate the concept... Actually, this is exactly what spreadsheet languages such as Excel can do. 
So my question is, is there a mechanism that permits the following in Matlab? (Note that the following syntax is just symbolic)
>> B = [1 2; B{1,1}+2 4] // store some values and a formula in the array

B =

     1     2
     3     4

>> B{1,1} = 10 // change the value of one cell

B =

     10     2
     3      4

>> EVAL(B) // there is a re-evaluation command to re-calculate all the cells

ans =

     10     2
     13     4

A:

Hopefully I'm understanding what you want correctly, but the answer is indeed yes.  You can store "formulas" in a cell array where each element is a handle or an anonymous function.
Perhaps you mean something like this:
formulae = {@(x) x+10, @sin, @cos, @(x) x / 3};

The syntax @ denotes a function handle and the (x) denote that this is an anonymous function with the input variable x.  The first cell element provides a function that adds 10 to every value that goes into it, the second and third parameters are handles to sin and cos, so these act like those trigonometric functions.  The last handle divides every value that goes into it by 3.
To demonstrate, let's create a small array, then go through each formula and apply each of them to the small array:
>> formulae = {@(x) x+10, @sin, @cos, @(x) x / 3};
>> A = [1 2; 3 4]

A =

     1     2
     3     4

>> formulae{1}(A)

ans =

    11    12
    13    14

>> formulae{2}(A)

ans =

    0.8415    0.9093
    0.1411   -0.7568

>> formulae{3}(A)

ans =

    0.5403   -0.4161
   -0.9900   -0.6536

>> formulae{4}(A)

ans =

    0.3333    0.6667
    1.0000    1.3333

We first create the formulae, then create a small 2 x 2 matrix of [1 2; 3 4].  After, we access each formula's cell, then put in the input A into the function and we get what you see.

However, when you're starting out, start with actually declaring functions in function scripts.... don't use this kind of style of programming for practical applications.  It makes your code less readable.  For example, doing sin(A) is much more readable than formula{2}(A).  People reading your code have to remember what position in the array corresponds to what formula you are applying to each element in the input.

