say, a file consists of a single column with 10000 rows
load file.txt a = file; k=1:10000; s = a(k,1).*cosd(3.6*k);
k=0:10000; plot(k,s) xlabel('k');
it does work at all, could anyone help?
No products are associated with this question.
Try this if a is a column vector:
a = file;
k = [1:size(a,1)]';
s = a.*(cosd(3.6*k));
Alternatively, k can be any column vector you wish to perform element-by-element multiplication with a. Just make sure a and k are of the same size.