No,
you should type the matrix definition first
I want to define a matrix (containing a variable such as "t")
then put it in a loop, and change the variable, and get different values
-----------
you should type: ( as I did! )
>> syms t
>> a=[sin(t) cos(t);cos(t) sin(t)]
a =
[ sin(t), cos(t)]
[ cos(t), sin(t)]
>> t=1.2;
>> a
a =
[ sin(t), cos(t)]
[ cos(t), sin(t)]
-----------------------------
is it clear?! I want "t" in the matrix to be a variable!
Is there any way to write a for loop in MATLAB to read the files i.e. texts that
are saved in a folder and do some operation on each in every iteration. So
let say if I have files 1.txt, 2.txt,,... all saved in a folder called
LOSS. i want to open 1.txt first----> do some calculation and display the
result, then open 2.txt and do the same calculation, then 3.txt and so on.
thanks