回答済み

Add title to one row of a subplot

You can use the new sgtitle() to create a single title for a group of subplots within a figure but I don't think it's possible t...

Add title to one row of a subplot

You can use the new sgtitle() to create a single title for a group of subplots within a figure but I don't think it's possible t...

6日 前 | 0

回答済み

Concatenate two audio files

If your intentions are to subsample every 8000 values in y1 and then concatenate y2 to the end, y3 = [y1(1:y1_sample_rate:nume...

Concatenate two audio files

If your intentions are to subsample every 8000 values in y1 and then concatenate y2 to the end, y3 = [y1(1:y1_sample_rate:nume...

6日 前 | 0

| 採用済み

回答済み

How to get the point under mouse click on the plot or histogram?

You can use the ButtonDownFcn function. Here's a demo you can run. It prints the selected bar index to the command window. fig...

How to get the point under mouse click on the plot or histogram?

You can use the ButtonDownFcn function. Here's a demo you can run. It prints the selected bar index to the command window. fig...

6日 前 | 0

| 採用済み

回答済み

inputparser fails to accept correct value

isinteger(1) % = FALSE This matlab function (which often causes confusion) does not determine if the input has an integer val...

inputparser fails to accept correct value

isinteger(1) % = FALSE This matlab function (which often causes confusion) does not determine if the input has an integer val...

6日 前 | 0

| 採用済み

回答済み

Testing if a input is a numerical (double) of character

You can use str2double() to convert the string to numeric. If the string did not contain something that can be converted to num...

Testing if a input is a numerical (double) of character

You can use str2double() to convert the string to numeric. If the string did not contain something that can be converted to num...

6日 前 | 0

| 採用済み

回答済み

Auto close uifigure upon deletion of handle from workspace

"This would prevent opening many instances of the class when running some script multiple times, while the handle to the GUI is ...

Auto close uifigure upon deletion of handle from workspace

"This would prevent opening many instances of the class when running some script multiple times, while the handle to the GUI is ...

6日 前 | 0

回答済み

ERROR came as "Index exceeds matrix dimensions".

f1 = 0; % 12th line of your code; so, f1 only has 1 element % (later in your code...) for j=2:J % interior nodes ...

ERROR came as "Index exceeds matrix dimensions".

f1 = 0; % 12th line of your code; so, f1 only has 1 element % (later in your code...) for j=2:J % interior nodes ...

6日 前 | 0

回答済み

how can i generate random number divided by 0.25 from 0 to 10 for example(0.25,7.75,5.50,6.25 ,........)?

% Generate 12 random number between [0,10] rn = rand(1,12)*10; % Round to nearest .25 rnRounded = floor(rn) + round(rem(rn,1...

how can i generate random number divided by 0.25 from 0 to 10 for example(0.25,7.75,5.50,6.25 ,........)?

% Generate 12 random number between [0,10] rn = rand(1,12)*10; % Round to nearest .25 rnRounded = floor(rn) + round(rem(rn,1...

6日 前 | 1

回答済み

How can i show plot inside ui app instead of another figure window?

Specify the UI Axis handle in the first input to plot(). plot(app.UIAxes, imageData); % __________ or whate...

How can i show plot inside ui app instead of another figure window?

Specify the UI Axis handle in the first input to plot(). plot(app.UIAxes, imageData); % __________ or whate...

7日 前 | 1

| 採用済み

回答済み

how to construct a cell array from another cell array

This fits the description from your comment under your question. It horizontally concatenates all combinations of the row vecto...

how to construct a cell array from another cell array

This fits the description from your comment under your question. It horizontally concatenates all combinations of the row vecto...

8日 前 | 0

| 採用済み

回答済み

Best Way to find density of [x,y] coordinates within set window

Here's an alternative that uses inpolygon() to determine whether coordinates are within a defined rectangular window centered at...

Best Way to find density of [x,y] coordinates within set window

Here's an alternative that uses inpolygon() to determine whether coordinates are within a defined rectangular window centered at...

8日 前 | 1

| 採用済み

回答済み

How to Break 'switch' statement without exiting entire 'while' loop.

Unlike other programming languages, "When a case expression is true, MATLAB executes the corresponding statements and exits the ...

How to Break 'switch' statement without exiting entire 'while' loop.

Unlike other programming languages, "When a case expression is true, MATLAB executes the corresponding statements and exits the ...

8日 前 | 0

回答済み

Interpolating linearly between many values in a vector

Set the 'resampleRate' to 1000 if you want [1,2] to become [1.001, 1.002, ... 2.999]. 'timestamps' is your original vector. r...

Interpolating linearly between many values in a vector

Set the 'resampleRate' to 1000 if you want [1,2] to become [1.001, 1.002, ... 2.999]. 'timestamps' is your original vector. r...

8日 前 | 0

回答済み

How to open .m fiile in editor and move to specific line number?

openAndGoToLine() Input 1 is a string identifying the absolute path to the file. Input 2 is an integer indicating the line num...

How to open .m fiile in editor and move to specific line number?

openAndGoToLine() Input 1 is a string identifying the absolute path to the file. Input 2 is an integer indicating the line num...

8日 前 | 3

| 採用済み

回答済み

Interrupting a Callback with a Push Button

"Inside the while loop, I want to check whether a certain push button has been pressed" The callback function for the pushbutto...

Interrupting a Callback with a Push Button

"Inside the while loop, I want to check whether a certain push button has been pressed" The callback function for the pushbutto...

8日 前 | 1

回答済み

How to enable a figure so that if I click on a point and it will show the value?

Active "data tips" and then you can click on any plotted coordinate to return the (x,y,z) values. From r2018b to present, the to...

How to enable a figure so that if I click on a point and it will show the value?

Active "data tips" and then you can click on any plotted coordinate to return the (x,y,z) values. From r2018b to present, the to...

8日 前 | 0

| 採用済み

回答済み

How to compare words in a line

Attached are 2 text files. "txt.txt" contains the text you shared in your comment under your question. "dcm.txt" is a vertical l...

How to compare words in a line

Attached are 2 text files. "txt.txt" contains the text you shared in your comment under your question. "dcm.txt" is a vertical l...

9日 前 | 1

| 採用済み

回答済み

Numerical errors in corrcoef

When you plot the results against eachother (code below), the pairs all fall along the diagonal but with tiny aberrations that a...

Numerical errors in corrcoef

When you plot the results against eachother (code below), the pairs all fall along the diagonal but with tiny aberrations that a...

9日 前 | 3

| 採用済み

回答済み

How to match points in two unequal list?

Here's how to find the closest value in B for each value in A. A = [1.1 2.2 3.1515 4.92121 1.1]; % Row vector! B = [1.25 ...

How to match points in two unequal list?

Here's how to find the closest value in B for each value in A. A = [1.1 2.2 3.1515 4.92121 1.1]; % Row vector! B = [1.25 ...

9日 前 | 0

| 採用済み

回答済み

Copy down cell value until new value and repeat for specific range

If you choose to do this in Matlab, this should get you started. It reads in a spreadsheet named "data.xlsx" as a table and pul...

Copy down cell value until new value and repeat for specific range

If you choose to do this in Matlab, this should get you started. It reads in a spreadsheet named "data.xlsx" as a table and pul...

9日 前 | 0

回答済み

Which way is better?

In terms of speed, the 2nd option is 3.0 times faster on average (p<0.0001, Wilcoxon Signed Rank; 1 million individually timed i...

Which way is better?

In terms of speed, the 2nd option is 3.0 times faster on average (p<0.0001, Wilcoxon Signed Rank; 1 million individually timed i...

10日 前 | 1

回答済み

How to replace values above a given percentile by nans

Here is an alternative function that ignores NaN values. It's not a nice one-liner like Star Striders but it does produce the sa...

How to replace values above a given percentile by nans

Here is an alternative function that ignores NaN values. It's not a nice one-liner like Star Striders but it does produce the sa...

10日 前 | 0

| 採用済み

回答済み

Linking two push buttons in Matlab GUI

Here is a complete demo you can run that allows you to drag-and-drop any GUI object that is assigned a KeyPress and KeyRelease f...

Linking two push buttons in Matlab GUI

Here is a complete demo you can run that allows you to drag-and-drop any GUI object that is assigned a KeyPress and KeyRelease f...

10日 前 | 0

回答済み

how to pick up all combination of numbers from multiple vectors

This solution requires that all vectors are placed into a single cell array. See comments for more detail. % Demo data a = 1...

how to pick up all combination of numbers from multiple vectors

This solution requires that all vectors are placed into a single cell array. See comments for more detail. % Demo data a = 1...

11日 前 | 0

回答済み

How do I show rows and columns from a matrix in a edit texted in MATLAB?

Your matrix does not contains many rows. In fact, it's a row vector so it only contains 1 row. You can see this in your first ...

How do I show rows and columns from a matrix in a edit texted in MATLAB?

Your matrix does not contains many rows. In fact, it's a row vector so it only contains 1 row. You can see this in your first ...

11日 前 | 0

| 採用済み

回答済み

How to convert cell to cell array of character vectors.

At least one of the elements in btl_data.POLYGON is not a character vector. This demo below recreates the error. A = [48.44, ...

How to convert cell to cell array of character vectors.

At least one of the elements in btl_data.POLYGON is not a character vector. This demo below recreates the error. A = [48.44, ...

11日 前 | 0

| 採用済み

回答済み

How to name different groupes of variables in one vector with indices of another?

Updated interpretation Generator = [3111 3112 3111].'; mod1 ={'\Delta \omega' '\Delta \delta'}; mod2 = {'\Delta \psi'...

How to name different groupes of variables in one vector with indices of another?

Updated interpretation Generator = [3111 3112 3111].'; mod1 ={'\Delta \omega' '\Delta \delta'}; mod2 = {'\Delta \psi'...

11日 前 | 2

| 採用済み

回答済み

Comparing words in text file line by line

"I got a text file with only one word in each line. How can I open and compare each word from this file with required word in a ...

Comparing words in text file line by line

"I got a text file with only one word in each line. How can I open and compare each word from this file with required word in a ...

11日 前 | 1

| 採用済み

回答済み

insert text as watermark in video( one frame)

Based on the error message, it appears that "block" is an [m x n x 1] array (or simply, [m x n]). You're accessing "block" in a...

insert text as watermark in video( one frame)

Based on the error message, it appears that "block" is an [m x n x 1] array (or simply, [m x n]). You're accessing "block" in a...

11日 前 | 0

回答済み

How do I associate specific colors with specific numbers of a matrix?

You set 9 colors in your colormap but you only have 6 unique intergers in "A". That means you're asking matlab to distribute 9...

How do I associate specific colors with specific numbers of a matrix?

You set 9 colors in your colormap but you only have 6 unique intergers in "A". That means you're asking matlab to distribute 9...

11日 前 | 0

| 採用済み