Answered

Sorting a data set to report failing values in pairs instead of individually

I think you're looking for.... % Coordinates you're keeping keepCoordinates = A(i2keepHS_HS2, :); % Coordinates you're no...

Sorting a data set to report failing values in pairs instead of individually

I think you're looking for.... % Coordinates you're keeping keepCoordinates = A(i2keepHS_HS2, :); % Coordinates you're no...

6 days ago | 0

| accepted

Answered

contextmenu in axes in GUI

Follow the example described in the documentation (link below). This code will go in your OpeningFcn function. https://www.m...

contextmenu in axes in GUI

Follow the example described in the documentation (link below). This code will go in your OpeningFcn function. https://www.m...

6 days ago | 0

Answered

Assigning row to array using cellfun

Here's your loop, within cellfun(). A = cellfun(@(x)[x(1:counter-1,:);B;x(counter+1:end,:)], A, 'UniformOutput', false);

Assigning row to array using cellfun

Here's your loop, within cellfun(). A = cellfun(@(x)[x(1:counter-1,:);B;x(counter+1:end,:)], A, 'UniformOutput', false);

6 days ago | 0

| accepted

Answered

Taking 1d cuts of data along polar contours

Your data are quite coarse. You can see the unit squares that make up each coordinate. So, you won't be able to create a perfe...

Taking 1d cuts of data along polar contours

Your data are quite coarse. You can see the unit squares that make up each coordinate. So, you won't be able to create a perfe...

6 days ago | 0

| accepted

Answered

Read .txt and Write in matab

Read in the whole file at once. In this example I'm using fileread() because I'm unfamiliar with the FEX submission readfile() ...

Read .txt and Write in matab

Read in the whole file at once. In this example I'm using fileread() because I'm unfamiliar with the FEX submission readfile() ...

6 days ago | 0

Answered

about function rats and how to output to .txt

a1 = strtrim(rats(a/pi)); Use strtrim() to remove leading and trailing white space.

about function rats and how to output to .txt

a1 = strtrim(rats(a/pi)); Use strtrim() to remove leading and trailing white space.

6 days ago | 1

| accepted

Answered

Finding change point of an array values

There are probably some smart algorithms that will be helpful (Image Analyst mentioned some hints). But here's a lower-level s...

Finding change point of an array values

There are probably some smart algorithms that will be helpful (Image Analyst mentioned some hints). But here's a lower-level s...

7 days ago | 0

| accepted

Answered

How to find values greater than a number in a cell of empty cells?

D = {[],[],3,[], -2, 0, [], 1, 6, []}; idx = cellfun(@(x)~isempty(x) && x >= 0, D); % logical index If you need the subscript...

How to find values greater than a number in a cell of empty cells?

D = {[],[],3,[], -2, 0, [], 1, 6, []}; idx = cellfun(@(x)~isempty(x) && x >= 0, D); % logical index If you need the subscript...

8 days ago | 0

| accepted

Answered

Invalid data type. First argument must be numeric or logical.

My guess is that.... [RT_CD_row,RT_CD_col]=size(RT_CD_Data); for C=1:1:RT_CD_row RT=(RT_CD_Data{C,1}); % ...

Invalid data type. First argument must be numeric or logical.

My guess is that.... [RT_CD_row,RT_CD_col]=size(RT_CD_Data); for C=1:1:RT_CD_row RT=(RT_CD_Data{C,1}); % ...

9 days ago | 0

Answered

Find the perfect overlay of 2 maps of points

You can compute the difference between the x values from each set and the y values from each set which will create a matrix of o...

Find the perfect overlay of 2 maps of points

You can compute the difference between the x values from each set and the y values from each set which will create a matrix of o...

9 days ago | 0

Answered

How do i change my script to print out the second word of each even line?

Instead of reading the file line by line you could read in the entire text file and then extract the 2nd word from even numbered...

How do i change my script to print out the second word of each even line?

Instead of reading the file line by line you could read in the entire text file and then extract the 2nd word from even numbered...

10 days ago | 0

| accepted

Answered

reshaping error after clustering pixels > 0 in image

I understand the problem but I don't have an entirely clear picture of what the imIDX variables should be. I think all you ne...

reshaping error after clustering pixels > 0 in image

I understand the problem but I don't have an entirely clear picture of what the imIDX variables should be. I think all you ne...

11 days ago | 0

| accepted

Answered

how to plot a cute sphere

If you don't have access to the cuteSphere toolbox, you can just use this line of code below to make the sphere appear as a sphe...

how to plot a cute sphere

If you don't have access to the cuteSphere toolbox, you can just use this line of code below to make the sphere appear as a sphe...

12 days ago | 1

Answered

Changing the transparency of a plot line, saved in a fig file

Manually edit each line object The easiest method would be to open the fig file, use the pointer to select the line you'd like ...

Changing the transparency of a plot line, saved in a fig file

Manually edit each line object The easiest method would be to open the fig file, use the pointer to select the line you'd like ...

12 days ago | 1

| accepted

Answered

Vector against a single value

% Create fake data for testing for i = 1:10 a(i).timevector = rand(8192,1); a(i).power = randi(10)+5; end % Creat...

Vector against a single value

% Create fake data for testing for i = 1:10 a(i).timevector = rand(8192,1); a(i).power = randi(10)+5; end % Creat...

13 days ago | 0

| accepted

Answered

How to make 2 legends

There are few ways to create a pseudo legend. One way is to plot your data on the main axes but instead of creating a legend fo...

How to make 2 legends

There are few ways to create a pseudo legend. One way is to plot your data on the main axes but instead of creating a legend fo...

13 days ago | 0

| accepted

Answered

Skipping if Statement even though a has been set to 0, on matlab GUI

a = get(handles.A_Value,'String'); % a is a string, not a number. % Option 1 is to convert a to a number a = str2double(ge...

Skipping if Statement even though a has been set to 0, on matlab GUI

a = get(handles.A_Value,'String'); % a is a string, not a number. % Option 1 is to convert a to a number a = str2double(ge...

13 days ago | 1

| accepted

Answered

plot the first sample with different color

plot(Fun(:,1)Fun(:,2),'.r-') hold on plot(Fun(1,1)Fun(1,2),'.g') % if you want the first coordinate % -OR- plot(Fun(1:2,1...

plot the first sample with different color

plot(Fun(:,1)Fun(:,2),'.r-') hold on plot(Fun(1,1)Fun(1,2),'.g') % if you want the first coordinate % -OR- plot(Fun(1:2,1...

13 days ago | 0

| accepted

Answered

How can i plot an inline function?

As explained in the documentation, inline() will be removed in the future. Use anonymous functions instead. Here's the form...

How can i plot an inline function?

As explained in the documentation, inline() will be removed in the future. Use anonymous functions instead. Here's the form...

13 days ago | 0

Answered

How to only select the last x number of columns when trying to concatenating a matrix using a for loop

"I do not know how to tell matlab to only take the last 31000 elements of each coloumn of each cell" To take the last n column...

How to only select the last x number of columns when trying to concatenating a matrix using a for loop

"I do not know how to tell matlab to only take the last 31000 elements of each coloumn of each cell" To take the last n column...

13 days ago | 0

| accepted

Answered

Error function definitions are not permitted in this context

It appears that you're running copy-pasted code directly from the command window. Function definitions are not supported from t...

Error function definitions are not permitted in this context

It appears that you're running copy-pasted code directly from the command window. Function definitions are not supported from t...

13 days ago | 1

| accepted

Answered

how to multiply data to the aplitude of each pluse of multiple cycles of a signal??little emergency please reply fast

Before we get into the solution, here's a few comments about the code. Your loop isn't doing anything useful. It's overwritten...

how to multiply data to the aplitude of each pluse of multiple cycles of a signal??little emergency please reply fast

Before we get into the solution, here's a few comments about the code. Your loop isn't doing anything useful. It's overwritten...

13 days ago | 1

| accepted

Answered

Trying to sort a text document by alphabetical order and count how many times a word appears

Here's a different approach. See inline comments for details. % Read text C = fileread('Theodore_Roosevelt_The_Duties_Of_Ame...

Trying to sort a text document by alphabetical order and count how many times a word appears

Here's a different approach. See inline comments for details. % Read text C = fileread('Theodore_Roosevelt_The_Duties_Of_Ame...

14 days ago | 0

| accepted

Answered

Counting pixels of colored objects in an image

The reason why the 2nd attempt doesn't work is because you're trying to match exact color values but your image clearly has many...

Counting pixels of colored objects in an image

The reason why the 2nd attempt doesn't work is because you're trying to match exact color values but your image clearly has many...

14 days ago | 0

| accepted

Answered

Reset or clear property values in App Designer

The callback to your app button can do 3 things. Open a new instance of the app but make is invisible. All properties will be...

Reset or clear property values in App Designer

The callback to your app button can do 3 things. Open a new instance of the app but make is invisible. All properties will be...

14 days ago | 0

Answered

REPEATED MEASURES ANOVA MATLAB

Is repeated measures anova the best way to go? Your design is certainly applicable to a repeated measures design but the answer...

REPEATED MEASURES ANOVA MATLAB

Is repeated measures anova the best way to go? Your design is certainly applicable to a repeated measures design but the answer...

14 days ago | 1

| accepted

Answered

how creat random text file

Another idea is to use randsample() to create random letters in the form of words separated by randomized spaces. This function ...

how creat random text file

Another idea is to use randsample() to create random letters in the form of words separated by randomized spaces. This function ...

16 days ago | 0

Answered

how to use Discretize syntax

data = randi(29,100,1); % demo data (100 values between 1:29 g = discretize(data, 1:4:29) % g is the group number...

how to use Discretize syntax

data = randi(29,100,1); % demo data (100 values between 1:29 g = discretize(data, 1:4:29) % g is the group number...

17 days ago | 0

Answered

Different error bar color than the plot

You can plot the main line and the error bars separately. Here's a demo that plots the main line first and then the errorbars....

Different error bar color than the plot

You can plot the main line and the error bars separately. Here's a demo that plots the main line first and then the errorbars....

17 days ago | 0

Answered

Function of vector with letter grade

Here, you can enter any type of numeric input from scalars, vectors, matricies, to n-dimensional arrays and the output will be t...

Function of vector with letter grade

Here, you can enter any type of numeric input from scalars, vectors, matricies, to n-dimensional arrays and the output will be t...

17 days ago | 2