Answered
how can I separate data per group ID
The fact that you don't have the same number of samples per group should not be a problem. As Stephen commented, this wouldn't p...

6 years ago | 0

| accepted

Answered
Matrix Division - Why am I getting a 1x1 matrix after dividing two 1x13 matrices?
The / operator solves a system of linear equation. If you want to perform elementwise division you need to use the dotted operat...

6 years ago | 2

| accepted

Answered
how to select one first and second sample of a sampled signal?
I'm not sure what you are trying to achieve with the code you have written, it doesn't make much sense I'm afraid. The whole l...

6 years ago | 1

Answered
rotating this curve 20degrees
You seem to have found the correct function, so it's not clear what the problem is: hline = plot(t, sdata); rotate(hline, [0 0...

6 years ago | 1

Answered
Get cell array with childs from a cell array of identical structs
You're complicating your life by using a cell array to store scalar structures. Notwithstanding the extra memory used, it's an u...

6 years ago | 0

| accepted

Answered
Index in position 1 exceeds array bounds (must not exceed 1)
First, is your text file read properly. If I paste your data into a new text file, your code fails to read anything. It's much b...

6 years ago | 0

Answered
default behaviour of key press callback for matlab figure
Matlab can't know which keys your callback care or doesn't care about, so your callback receives all the key presses and indeed ...

6 years ago | 1

| accepted

Answered
multiple for loops split data
For the record, this is my suggested modification to the original code: workers = 12; destination = discretize(data.ID, linspa...

6 years ago | 1

| accepted

Answered
Implementing a stop button in AppDesigner
PIDs are used by the OS to track executables. m scripts don't have PIDS they're run within a matlab executable. Assuming the m s...

6 years ago | 0

| accepted

Answered
How to extract event start and finish indices by finding rising edges and falling edges of an array?
I think you've answered your own question. "How to handle this situation? Would you remove those inappropriate events". Yes, you...

6 years ago | 2

| accepted

Answered
Undefined operator '-' for input arguments of type 'matlab.ui.control.UIControl'. - getting an Error and and cant find a solution.
Matlab will always call your callback with two inputs. The first input is always the control handle triggering the callback, the...

6 years ago | 2

| accepted

Answered
Create subfolders in the desired way
As Per isakson said, use fullfile instead of building paths manually. fullfile automatically inserts the correct path separator ...

6 years ago | 0

| accepted

Answered
How to use methods of the class in the constructor of this class?
Having a method that calculates a particular property: No problem, particularly if the calculation is fairly complex as you have...

6 years ago | 0

| accepted

Answered
Too many output arguments when using "rowfun" function
Glad the problem is resolved, however I would strongly recommend to refactor the code. I like rowfun, varfun, etc. but for you I...

6 years ago | 1

| accepted

Answered
How to calaculate This standard deviation correction factor in Matlab?
I think you first need to clarify what is meant by "the 10-percentile value of standard deviations across features". I very much...

6 years ago | 1

Answered
wrong rational numbers generated by Matlab
Hum: >> rats(23/52) ans = ' 23/52 ' So, no issue there. Of course, 23/52 is not equal to 0.4423, so if you give ...

6 years ago | 2

| accepted

Answered
Find specific text within string ('contains' command?)
If you're looking for an exact match, then it's strcmp you want, not contains. find(strcmp(list, searchinput))

6 years ago | 0

| accepted

Answered
Creating a Random Upper Triangular Matrix with Unique Entries for Efficiently Computing Matrix Exponential.
The main issue is that a lot of your code is not valid matlab syntax, or doesn't make much sense, e.g if k >= k when is a valu...

6 years ago | 0

Answered
How to store sequence of bits as a bit stream and use the least possible memory ?
A bit similar to Matt's suggestion, but may be slightly more memory efficient since bwpack uses multiples of 32-bit, is to: spl...

6 years ago | 0

Answered
Erase data assigned to the variables for every iteration of the FOR LOOP
First, let's fix your starting point. As I said, for what you're doing tables are the wrong storage. They're more complicated to...

6 years ago | 0

| accepted

Answered
How to increment a v value to an i position in a vector every n iterations ?
I don't really understand your example, particularly the E which doesn't appear to have any meaning (shouldn't the A in your exa...

6 years ago | 0

Answered
Click escape to stop my MouseDownfcn in the GUI?
Probably, the simplest thing is to disable whichever callback you don't want to execute once escape is pressed, so in the Window...

6 years ago | 0

Answered
Extract data from multiple excel files
I would recommend you use fullfile instead of strcat to build paths. This way you don't have to worry about path separators. As...

6 years ago | 0

| accepted

Answered
How can i calculate cmyk values from rgb in matlab?
People who use simple formulae like the one in the other answer are people who do not understand CMYK. Typically, if you want ...

6 years ago | 4

| accepted

Answered
How to apply recursion?
Recursion is rarely an efficient coding method and I wouldn't be surprised if you hit the default recursion limit on some large ...

6 years ago | 0

| accepted

Answered
Reading .txt file
Well, yes you can't read that as a single number. You can either store the whole lot as a vector of digit characters: digits_te...

6 years ago | 0

| accepted

Answered
Sum calendar Duration array
Are you actually interested in getting the result as a calendarDuration as opposed to plain duration? Indeed, for some reason su...

6 years ago | 0

| accepted

Answered
imwrite error saying 'TransparentColor' is not a recognized parameter
Yes, the documentation list 'TransparentColor' as a parameter but only for GIF images. GIF is a very limited format, completely ...

6 years ago | 0

| accepted

Answered
Check appearance counts of multiple patters in a cell matrix
Any way to vectorize the code? Not really, you could cellfun it, but that's not vectorisation (cellfun is just a loop in disgui...

6 years ago | 1

| accepted

Answered
finding the name which are the same in an Excell file and make structure and sub-structure form them
From your description, it really sounds like you would be better off using a table rather than splitting the data into structure...

6 years ago | 0

| accepted

Load more