Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I am kind of new to Matlab so the questions I will ask probably sound a bit basic. Anyways, here goes:

I want to create the matrix below which has both constants and variables. How can I do this? I know how to create a normal matrix (e.g. B = [1 0 2; 3 4 5; 0 2 3]) but I don't know how to create matrices with variables in them?

I tried to type the matrix in as is shown above but it doesn't seem to work. I'm pretty sure I should be following some sort of method but I have no clue.

Apart from element a31, all the elements are constants that I've been given (Fc, Vc, Vr, Fr and dt are constants). Element a31 can vary since the ''Act'' term can vary. I understand that I can just enter the constants instead for the other elements, but for now I'd like to enter the elements so it looks like the image I posted.

EDIT: I'd like to add that in element a44, there should be no ''/'' sign. That is a mistake. It should be just 1-Fc*dt/Vc.

Thanks!

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# How to create a matrix with variables?

Loading...

Similar Threads - create matrix variables | Date |
---|---|

Creating m by m matrix in matlab | May 3, 2012 |

Matlab - I want to create row matrix | Apr 20, 2012 |

Creating Matrix from List in Mathematica | Jul 21, 2011 |

How to create a labelled matrix in LaTeX? | May 28, 2008 |

**Physics Forums - The Fusion of Science and Community**