Undefined function 'C' for input arguments of type 'double'.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hello!
i am running into a problem with my script with this line:
whole_ts = {1:2150, 1:1928, 1:2426};
I've tried:
whole_ts = [{1:2150, 1:1928, 1:2426}];
whole_ts = (1:2150, 1:1928, 1:2426);
whole_ts = [C{1:2150, 1:1928, 1:2426}];
whole_ts = timeseries([1:2150], [1:1928], [1:2426])
this one seems the most promising:
whole_ts = [C{1:2150, 1:1928, 1:2426}];
where i am getting this error:
Undefined function 'C' for input arguments of type 'double'.
I am trying to load it into a cell like I did with the 'trs' variable which is 1x3 but 'whole_ts' has is [1:2150, 1:1928, 1:2426].
%% loading TACS
subj = {'subj01' 'subj02' 'subj03'}
trs = [2.8, 2.2, 2.2];
whole_ts = [C{1:2150, 1:1928, 1:2426}];
for k = 1:3
ts{k} = load(fullfile(D,subj{k},'ts','thalamus_ts.txt'));
whole_ts = 1:length(ts{k})
t_mr_1 = (1:length(whole_ts))*(trs(k)/60)
subplot(3,1,k), hold on
plot(t_mr_1, ts{k})
end
Any help would be much appreciated!
8 comentarios
Walter Roberson
el 3 de Mzo. de 2021
Where did you get the C part from? Why are you expecting it to be there?
whole_ts = {1:2150, 1:1928, 1:2426};
Your file looks like it might be a 2D array instead of a vector. If so then you have to be very careful when you use length() as length(X) is defined as:
temporary = size(X);
if any(temporary == 0)
length is 0
else
length is max(temporary)
end
That is, length is 0 if any dimension is 0, and otherwise length is the largest dimension, no matter which one it is.
However, when you ask to
plot(t_mr_1{k},ts{k})
then if ts{k} is a 2D array, then MATLAB would try to plot every column as a separate line, and the length of t_mr_1{k} would have to be the same as the number of rows in ts{k} .
Respuestas (0)
Ver también
Categorías
Más información sobre Biomedical Imaging en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!