Answered

readtable of csv file with opts.DataLines =[n1 n2] and n1>2 doesn't work as expected

If you look at the actual content of the file, you see that it has a blank line between each line of data. Although blank lines ...

readtable of csv file with opts.DataLines =[n1 n2] and n1>2 doesn't work as expected

If you look at the actual content of the file, you see that it has a blank line between each line of data. Although blank lines ...

9 hours ago | 0

| accepted

Answered

overwrite Handle class - hide 'isvalid' function and 'ObjectBeingDestroyed' event

is it possible to copy the source code of the original handle class No, we don't have access to that source code. In any case i...

overwrite Handle class - hide 'isvalid' function and 'ObjectBeingDestroyed' event

is it possible to copy the source code of the original handle class No, we don't have access to that source code. In any case i...

10 hours ago | 1

| accepted

Answered

image callback in app designer

You may want to consider using a uiimage instead of an Image inside a uiaxes. I suspect you've defined the callback incorrectly...

image callback in app designer

You may want to consider using a uiimage instead of an Image inside a uiaxes. I suspect you've defined the callback incorrectly...

11 hours ago | 0

Answered

Error using load Unable to read file No such file or directory.

The error message is very clear, there is no file E:\Program Files\MATLAB\R2016a\bin\EegMyDataDir 1\with occular artifact\cnt I...

Error using load Unable to read file No such file or directory.

The error message is very clear, there is no file E:\Program Files\MATLAB\R2016a\bin\EegMyDataDir 1\with occular artifact\cnt I...

13 hours ago | 1

Answered

Can we categorize and sum 2 columns from table

There are plenty of functions to compute aggregrate properties of table. groupsummary is one way, split-apply-combine workflow i...

Can we categorize and sum 2 columns from table

There are plenty of functions to compute aggregrate properties of table. groupsummary is one way, split-apply-combine workflow i...

1 day ago | 0

Answered

(App Designer) ListBox Callback - does my value need to change to get a callback?

It sounds like you need to change your design slightly. At the moment, it sounds like you're only plotting when y changes but ac...

(App Designer) ListBox Callback - does my value need to change to get a callback?

It sounds like you need to change your design slightly. At the moment, it sounds like you're only plotting when y changes but ac...

1 day ago | 0

Answered

I keep getting the error of load library

Biometrics are a bit misleading as it's not a new problem. You simply don't have any compiler installed and you need one to use ...

I keep getting the error of load library

Biometrics are a bit misleading as it's not a new problem. You simply don't have any compiler installed and you need one to use ...

1 day ago | 0

| accepted

Answered

How can I replace a cell array with numeric array for a big dataset?

I'm a bit unclear on why you're trying to use cell2mat. Once you've imported the data into a table then you should be using tabl...

How can I replace a cell array with numeric array for a big dataset?

I'm a bit unclear on why you're trying to use cell2mat. Once you've imported the data into a table then you should be using tabl...

1 day ago | 0

| accepted

Answered

rows interval using textscan

The intent of the question is a bit unclear since textscan cannot parse excel files. If the intent is to parse a csv file, then ...

rows interval using textscan

The intent of the question is a bit unclear since textscan cannot parse excel files. If the intent is to parse a csv file, then ...

1 day ago | 0

| accepted

Answered

having trouble with number displays in matrix

format compact only affects the line spacing of the display. It doesn't affect how numbers are displayed. I tend to use format ...

having trouble with number displays in matrix

format compact only affects the line spacing of the display. It doesn't affect how numbers are displayed. I tend to use format ...

1 day ago | 0

| accepted

Answered

how to find an empty row in a table

Even simpler, and probably faster, use the table tools (rather than cell array tools): yourtable = rmmissing(yourtable)

how to find an empty row in a table

Even simpler, and probably faster, use the table tools (rather than cell array tools): yourtable = rmmissing(yourtable)

4 days ago | 1

Answered

How can a code run on a single image perfectly, but the same code on an entire database crashes? Where am I going wrong?

As Jan said you haven't preassigned any of the structures you're using (plus you're also growing your structure arrays in loops,...

How can a code run on a single image perfectly, but the same code on an entire database crashes? Where am I going wrong?

As Jan said you haven't preassigned any of the structures you're using (plus you're also growing your structure arrays in loops,...

4 days ago | 0

Answered

Matlab doesn't write on excel after the first loop in try catch

There's never any reason to use cd and using cd is matlab is dangerous since it can change which m files are in scope. It's dou...

Matlab doesn't write on excel after the first loop in try catch

There's never any reason to use cd and using cd is matlab is dangerous since it can change which m files are in scope. It's dou...

5 days ago | 0

Answered

How do I find multiple times in one array the first index of 25 samples exceeding the threshold

You never needed a loop to do what you want. The below will find the start indices of all runs of 1 of length 25 or more: %demo...

How do I find multiple times in one array the first index of 25 samples exceeding the threshold

You never needed a loop to do what you want. The below will find the start indices of all runs of 1 of length 25 or more: %demo...

7 days ago | 0

| accepted

Answered

time formate changes while exporting table as excel

The date/time format specifiers in Excel are slightly different from the ones use by matlab. In particular, to display milliseco...

time formate changes while exporting table as excel

The date/time format specifiers in Excel are slightly different from the ones use by matlab. In particular, to display milliseco...

7 days ago | 0

| accepted

Answered

Need help creating a for loop

No need for a loop: result = nonzeros(flipud(tril(repmat((95:-5:5)', 1, 95/5))))' Of course, if this is homework and you do ne...

Need help creating a for loop

No need for a loop: result = nonzeros(flipud(tril(repmat((95:-5:5)', 1, 95/5))))' Of course, if this is homework and you do ne...

8 days ago | 0

| accepted

Answered

Making loop calculate-able

Even if your code is correct, it is extremely bad practice to use the same variable names for the loop indices and for local var...

Making loop calculate-able

Even if your code is correct, it is extremely bad practice to use the same variable names for the loop indices and for local var...

8 days ago | 0

Answered

How to fix the errors Arise from moving .m files and functions in folders?

Ok so I should move all of the programs and functions (.m files ) in other drive except drive C (which Matlab has installed), fo...

How to fix the errors Arise from moving .m files and functions in folders?

Ok so I should move all of the programs and functions (.m files ) in other drive except drive C (which Matlab has installed), fo...

8 days ago | 1

| accepted

Answered

Get all sets of cells from two arrays of cells, each of which contains exactly one cell from each column of each arrays.

There's no such thing as an array of cells in matlab. There are matrices or arrays (a matrix being a 2D array) and there are cel...

Get all sets of cells from two arrays of cells, each of which contains exactly one cell from each column of each arrays.

There's no such thing as an array of cells in matlab. There are matrices or arrays (a matrix being a 2D array) and there are cel...

8 days ago | 0

| accepted

Answered

matlab file on disk might be empty

I would suggest you contact your IT. There's clearly a synchronisation problem between your computer and the network drive. Note...

matlab file on disk might be empty

I would suggest you contact your IT. There's clearly a synchronisation problem between your computer and the network drive. Note...

9 days ago | 0

Answered

Choosing data based on names

Of course, you don't need to hardcode anything. If you really just want A: [minval, maxval] = bounds(data.Test1(data.Type == '...

Choosing data based on names

Of course, you don't need to hardcode anything. If you really just want A: [minval, maxval] = bounds(data.Test1(data.Type == '...

10 days ago | 1

Answered

Variance function in matlab

Yes, this is exactly what it says in the documentation. Weight, specified as one of: 0 — normalizes by the number of observati...

Variance function in matlab

Yes, this is exactly what it says in the documentation. Weight, specified as one of: 0 — normalizes by the number of observati...

10 days ago | 0

| accepted

Answered

How do you remove duplicates of nested cells?

Sounds like: Dates{1} = unique(Dates{1}); %What a misleading variable names if it doesn't contain dates/times! is what you're...

How do you remove duplicates of nested cells?

Sounds like: Dates{1} = unique(Dates{1}); %What a misleading variable names if it doesn't contain dates/times! is what you're...

10 days ago | 0

Answered

Index position exceeds array bounds(must not exceed 15)

I'm not sure what you find unclear about the error and why you can't find the problem yourself. Index in position 1 exceeds arr...

Index position exceeds array bounds(must not exceed 15)

I'm not sure what you find unclear about the error and why you can't find the problem yourself. Index in position 1 exceeds arr...

10 days ago | 0

Answered

large numbers in K means

What's unclear about the error? You must specify less cluster than the number of rows in your matrix/vector. So make sure that K...

large numbers in K means

What's unclear about the error? You must specify less cluster than the number of rows in your matrix/vector. So make sure that K...

10 days ago | 0

| accepted

Answered

./ and .* operations

As per G A's comment, R2016b introduced automatic expansion for compatible array sizes. So, this works in R2016b or later: x = ...

./ and .* operations

As per G A's comment, R2016b introduced automatic expansion for compatible array sizes. So, this works in R2016b or later: x = ...

11 days ago | 0

Answered

Assign value to matrix using vector value as an index

One solution: [row, page] = ndgrid(1:numel(a), 1:numel(B)); %cartesian product of indices of a and B. Indicates which row and ...

Assign value to matrix using vector value as an index

One solution: [row, page] = ndgrid(1:numel(a), 1:numel(B)); %cartesian product of indices of a and B. Indicates which row and ...

11 days ago | 0

| accepted

Answered

Loop for extracting a matrix

Reshape your array into a 3D array with rows of 10 elements, columns of 150/10 = 15 elements, and 2 pages. Take the mean across ...

Loop for extracting a matrix

Reshape your array into a 3D array with rows of 10 elements, columns of 150/10 = 15 elements, and 2 pages. Take the mean across ...

11 days ago | 0

Answered

How to generate the n number of figure for n numbers of subplots

I was very surprised to find that subplot 231 works. It's an undocumented feature of subplot, I would strongly recommend again...

How to generate the n number of figure for n numbers of subplots

I was very surprised to find that subplot 231 works. It's an undocumented feature of subplot, I would strongly recommend again...

12 days ago | 0

| accepted

Answered

list names in an array

A lot simpler than all that has been suggested: foldercontent = dir('C:\somewhere\*.csv'); filelist = fullfile({foldercontent....

list names in an array

A lot simpler than all that has been suggested: foldercontent = dir('C:\somewhere\*.csv'); filelist = fullfile({foldercontent....

12 days ago | 2