Question


Inserting matrices in a cell - in a for loop
I have to create eleven matrices with fiber photometry data coupled with occurrence of eleven stimuli, to understand how each of...

mer än 4 år ago | 1 answer | 0

1

answer

Question


Error using reshape because "size arguments must be real integers"
Activity_dff is a 1200640x1 matrix of decimal numbers. When trying to do this: %% Calculate dff fd = prctile(Activity_smooth,1...

mer än 4 år ago | 1 answer | 0

1

answer

Question


No file or directory error when trying to read in an edf file
When trying to read in an edf file with this code: %Get the edf file edf_name = uigetfile('*.edf') ; string_compare = strcmp(...

mer än 4 år ago | 1 answer | 0

1

answer

Question


Why does textscan only read the first row of my text file?
for file = 1:total_files [inputfile,path] = uigetfile('*.txt'); fileids{file} = fopen(fullfile(path, inputfile)); if fileids{...

mer än 4 år ago | 1 answer | 0

1

answer

Question


Error using edfread when trying to read in an edf file
When trying to read in an edf file with this code: %Get the edf file edf_name = uigetfile('*.edf') ; string_compare = strcmp(...

mer än 4 år ago | 0 answers | 0

0

answers

Question


Is there a way to read only two columns of a file with textscan?
%Get events from text file prompt_totalfiles = 'Enter number of files you want to input: '; %asks for number of files total_...

mer än 4 år ago | 2 answers | 0

2

answers

Question


Error using textscan, when trying to read in the first two columns of a text file
I am trying to use the following code to read in a text file. %Get events from text file prompt_totalfiles = 'Enter number of ...

mer än 4 år ago | 1 answer | 0

1

answer

Question


Since my variable changes size on every loop iteration, how do I preallocate memory?
MATLAB says that my variable activity_dff changes size on every loop iteration and for this reason I should consider preallocati...

mer än 4 år ago | 2 answers | 0

2

answers

Question


Efficiency: how can I define in a single line n matrices corresponding to n elements in a cell?
I have cell wholedff, which contains 11 elements. wholedff={one,two,three,four,five,six,seven,eight,nine,ten,eleven}; I want ...

mer än 4 år ago | 1 answer | 0

1

answer

Question


How do put the values within a cell in a matrix?
dff1 = []; dff2 = []; dff3 = []; dff4 = []; num_dff = rand(5121,2); wholedff = {dff1, dff2, dff3, dff4}; for i = 1:lengt...

mer än 4 år ago | 1 answer | 0

1

answer

Question


How do I avoid using a lot of if statements in a row?
Hi all! I have to execute the content of the following code, which I'm sure can be written in a much more elegant and efficient ...

mer än 4 år ago | 2 answers | 0

2

answers