The food pellets also have color additives that help give the farm raised salmon the nice pinkish color weâre all accustomed to. Otherwise, theyâd be a dullish grey color*. *Wild salmon, by contrast, obtain their pink hue from their natural environment by feasting on a diet of krill, which eats red algae. 7.
Generate random numbers with a given distribution. The rand function in MATLAB returns uniformly distributed pseudorandom values from the open interval (0, 1), but we often need random numbers of other kind of distributions. A great article written by John S. Denker explains a method of generating random numbers with arbitrary distribution.
In MATLAB environment, every variable is an array or matrix. You can assign variables in a simple way. For example, MATLAB will execute the above statement and return the following result â. It creates a 1-by-1 matrix named x and stores the value 3 in its element. Let us check another example, MATLAB will execute the above statement and return the following result â. Please note that â. Once a variable is entered into the system, you can refer to it later. Variables must have values before they are used.