MATLAB: Running for loop to run values through symbolic matrix

for loopMATLABsymbolic

So here is my problem. I have a symbolic matrix a1, looks something like this [1,2f/3;0,1].
I need to run different values of f through a1 and output the resulting values into a new matrix. I want to run f being f=linspace(1e9,3.5e9,100), or similar values, being 100 different values from 1e9 to 3.5e9. So the resulting A1 vector will have 100 values inside of it.
here is what i have so far: (i know it is wrong, i just dont know how to setup my for loop properly) Thank you in advance, anyhting helps
a1=[1,2f/3;0,1]
A1=zeros(1,100)
length=100;
for f=linspace(1e9,3.5e9,100)
A1=a1(f)
end

Best Answer

Create ‘a1’ as:
syms a1(f) f
a1(f) = [1,2*f/3;0,1];
...
I have no idea why you are doing the same thing 100 times. Using the repmat function would likely be more efficient.