Question

Concatenating double arrays from same cell array

Hi I know how to concatenate elements of two cells with cellfun, however I want to concatenate double arrays of the same cell...

7 years ago | 1 answer | 0

Question

Using different strings for same operations

Hi I have in my code many lines which are something like this: onset_stim112 = reshape(onset_stim112(numStim-rem+1:end),...

7 years ago | 2 answers | 0

Question

Concatenating doubles in cell arrays

Hi I have two cell arrays, each of them 1x25. Each contains a 2x1 double array in the first 24 elements, and a 60x1 double ar...

7 years ago | 1 answer | 0

Question

Filling cells with repetitive strings

Hi I want to create a 1x60 cell array (60 different elements). The elements 1:10 each should contain a certain string, say 'h...

7 years ago | 3 answers | 0

Question

Turning each element of a double array into an element of a cell

Hi I know the mat2cell function, but as far as I see it is more suited to turn mats into cells when you have a cell with only...

7 years ago | 1 answer | 0

Question

Repeated Permutation of the same numbers

Hi everyone, Say I have an array a of 3 numbers (or alternatively of 4 or 5 or..): a = [0.21 0.018 0.34]; I want to c...

7 years ago | 2 answers | 0

Question

Label bars of a histogram

Hi, I construct a histogram with Matlab's "bar" function. The bins are constructed as follows: n = 8; binranges = lin...

7 years ago | 3 answers | 0

Question

Writing Header for csv overwrites data in csv

Hi! I have a 138x2 matrix A, which I save as a csv: csvwrite('A.csv',A); Now I want to add for each column a header, ...

7 years ago | 2 answers | 0

Question

Plot based on bins with binary data

Hello I have two arrays, say array *stimDuration* - which contains the duration a subject has seen a stimulation - and array ...

7 years ago | 1 answer | 0

Question

Random allocation of variables

Hi I have two Signals, say Sig1 and Sig2 - both sine waves with different amplitudes. Now I have two other variables, RHand ...

7 years ago | 1 answer | 0

Question

Label more than 7 lines in a plot

Hi, I am realizing that after 7 lines, Matlab seems to run out of colors for graphs and legends..is that correct? Currently ...

7 years ago | 2 answers | 0

Question

Splitting up a matrix - how can I do it more efficient?

Hi Say I have a 200x8 matrix A. I want to split it up into (for instance) 10 parts, as follows: [Rows 1-20 and all 8 colum...

7 years ago | 3 answers | 0

Question

Removing Nans, converting matrix to vector

Hi I have 50 x 60 x 45 double arrays, from which I want to remove the Nans, and, which I then want to convert into a (row or ...

8 years ago | 1 answer | 0

Question

array name indexing in matlab

Hi I have a 5x1 cell called C in matlab. Each of its columns contains a 1x20 double array. I want to do the following now: ...

8 years ago | 3 answers | 0

Question

How to access double arrays in a cell array?

Hi everyone, I have a 1x5 cell array, where each of these 5 columns contains a 20x1 double array. Now I have the following...

8 years ago | 1 answer | 0

Question

Reducing matrix dimension to a lower dimension

Hi all, I have a 1 x 400 x 16 matrix (400 measurements, 16 times). I would like to end up simply with a 400 x 16 matrix. Tho...

8 years ago | 1 answer | 0

Question

Mahalanobis distance for a matrix with itself

Hi I am not sure I understand how I can do the following: I have a 100x200 matrix - these are 100 timeseries, each timeser...

8 years ago | 0 answers | 0

Question

Feature Selection with SVM

Hi I want to follow the same approach as suggested here, with t-testing and forward feature selection: http://www.mathwor...

8 years ago | 0 answers | 0

Question

arguments of the "classify" function

Hi I have both read the doc of "classify", and have also looked at the examples with the dataset fisheriris. However I am st...

8 years ago | 1 answer | 0

Question

Crossvalidation for linear support vector machine

Hi I have the following code which performs k-fold crossvalidation. And as you can see the kernel chosen is a linear kernel...

9 years ago | 0 answers | 0

Question

Simple SVM classification code

Hi, I have Matlab2013a, and use the following code for classifying my data (it is mostly taken from http://stackoverflow.com/...

9 years ago | 0 answers | 0

Question

Barplot with errorbar for matrix of variances

Hi I have the following 5x6 matrix A = [1 16 12 7 9 5; 4 18 7 8 9 10; 7 8 10 9 14 17; 13 15 9 8 4 12; 8 7 23 9 12 11] ...

9 years ago | 1 answer | 0

Question

saving files in a loop with different names

Hi My code looks something like: for k = 1:length(sixCenters) grouped(:,:,k) = fisher_matrix; file...

9 years ago | 2 answers | 0

Question

Extracting values from incomplete matrix set

Hi So despite the cumbersome question title, the problem is simple: I want to extract the value (62,122) from 84 matrices. The ...

9 years ago | 1 answer | 0

Question

Change Tick Mark Enumeration for Plots

I have the following question: I want to plot for the y-axis a range from 0 to 2, but only one to have the ticks from 0 to 1 enu...

9 years ago | 1 answer | 0

Question

create variable name and save

Hi I work with several subjects, and I want to find a way to 1. May a new folder for each one of them (with their name and t...

9 years ago | 1 answer | 0

Question

plot in different colors for fit function

Hi, I want to plot the following two graphs in one plot - unfortunately they are both red: mid_bin = [189 247 305 3...

9 years ago | 4 answers | 0

Question

replacing different elements in a matrix according to different conditions

Hi I have an array which contains integers from 0 to 5. Now I want to replace all 5s with a 0, all 0 with a 5, the 2s with a...

9 years ago | 1 answer | 0

Question

Change y axis length without changing axis range

Hi I have the following code mid_bin = [196.2500 268.7500 341.2500 413.7500]; corr_perct = [0.4167 0.9412 1....

9 years ago | 1 answer | 0

Question

Counting number of 1's in different bins

Hi I have again a question regarding bins: Again an array A: A = [100 150 190 200 250 300 350 370 390 400 400] an...

9 years ago | 3 answers | 0