- #1

- 101

- 0

## Homework Statement

Hi everyone, I'm new to using matlab and had a quick question. I'm trying to write a function such that my input into it is a number, say n, and it produces an n by n matrix with symbolic variables with names of the form aij , where i and j are numbers that refer to its row and column positions. This didn't seem like it would be too terribly tough, but I'm not sure how to make give my matrix these variable names of the form aij. I figured I could write a loop of some form that went from 0 to n and gave each an a1n or something of that form name, just to get at least one row, but I'm not too sure what syntax to use to give the symbolic variable its name. I was hoping I could write a loop with a variable i that ranged from 0 to n, and then do something like syms a'i' or something like that. I thought maybe if I turned the number i into a string, I could do something like that to make a bunch of symbolic variables, but I still had no luck. Any suggestions would be very appreciated. Thanks!