回答済み
How can I find the parcentage of values in a vector that are bigger than 5.
" I want to calculate the number of values in that vector that are bigger than 5" p = sum(v>5)/numel(v); If there are NaN val...

5日 前 | 0

回答済み
ttest NaN result is NaN and i am a beginner
Since this topic continues to surface within the forum, here's a summary of reasons why NaN values may appear in a ttest() outpu...

5日 前 | 2

| 採用済み

回答済み
Correct way to detect Zero crossing
The entire function can be replaced with y = I<1e-8; which will return a logical (true | false). If you want a double (1 | ...

5日 前 | 0

回答済み
Why does polyfit not exist in r2019b?
It does exist in r2019b. https://www.mathworks.com/help/matlab/ref/polyfit.html You have a variable with the same name so Matla...

5日 前 | 0

| 採用済み

回答済み
Figure colorbar is not refreshed
Control the limits of the colorbar using caxis(). This line adjusts the colorbar limits to the range of your data. caxis([min...

5日 前 | 0

| 採用済み

回答済み
Why do I get an NaN error with the ttest?
Rather than copying the answer to here, see this review of possible causes of NaN output in ttest().

5日 前 | 0

回答済み
Matlab considers different two equal numbers!
You could limit the values in your matrix to the first 4 decimal places but this is usually not a good idea unles there's a reas...

5日 前 | 1

回答済み
Why am I getting "Array indices must be positive integers or logical values"?
This line below implies that you're trying to index values from an array N where the index values must be positive integers or l...

6日 前 | 1

回答済み
How to create 2D sub arrays by sampling every n by n points
The iter-loop is completely unnecessary and is merely doing the same exact work 1000 times. numIter=1000; tic % for iter=1:n...

6日 前 | 0

回答済み
How can I put a display that shows changing variables in a plot?
Use h=text(. . .) to create the text object and then update the handle as needed. Here's a demo clf() axh = axes(); h =...

6日 前 | 0

回答済み
Change bar colors based on date
The only place in your data where I see moon phase is in column F of your spreadsheet and only the first month is indicated. Th...

6日 前 | 0

| 採用済み

回答済み
how expand plots with different x-axis ranges
Specify the edges for both histograms rather than letting that funciton choose the bins. histogram(X,edges) If the data fro...

6日 前 | 0

回答済み
Resize plot to fit text
Get the extent of the text objects after plotting the text. Add the vertical position and height to get the upper position of ...

6日 前 | 1

| 採用済み

回答済み
Error using plot Vectors must be the same length.
The cross correlation function xcorr() will produce an output with 2*M-1 elements where M is the number of elements in the input...

6日 前 | 1

| 採用済み

回答済み
Non linear least square fitting
Create noisy circular data This section creates the noisy data we're fitting. % Create randome points along a circle r = 22...

6日 前 | 1

| 採用済み

回答済み
How to read file .txt?
Assuming your text file is named myTextFile.txt and contains only that matrix, A = readmatrix('myTextFile.txt'); % for Matlab ...

6日 前 | 0

| 採用済み

回答済み
How do I shade the xy plane at z=0 of my plot and how to stop the plot after it passes z=0?
The easiest solution is simply zlim([0,inf]) I also added grid on so we can see the 3D coordinates better. However, the data b...

6日 前 | 0

| 採用済み

回答済み
How to display result in Text Area in Matlab Appdesigner
It's unclear whether you're working with numeric or text values. App designer has edit fields that return text and edit fields ...

6日 前 | 0

回答済み
Print user-defined error messages as a table
msg = sprintf(['Polygon not supported. List of supported polygons is:\n' ... ' Triangle\n Square\n Pentagon\n Hexagon\n Hep...

9日 前 | 0

| 採用済み

回答済み
First cell in array is empty
oops! Typo... should be for i = 1:length(theta) % ^^ end Two more unrelated tips: Always pre-allocate your lo...

9日 前 | 1

| 採用済み

回答済み
How to filter a cell array filled with strings?
This will return a logical array the same size as 'A' where TRUE values indicate elements of A that meet the following requireme...

10日 前 | 1

| 採用済み

回答済み
How can I use Textbox input from GUI in a separate script?
"I want to use the input of the textbox of my gui which i have created with guide, in a seperate Matlab script" There are sever...

10日 前 | 0

回答済み
Why is format long providing a strange result?
It's because of the way you're combing two variables in the output display. Look at the last iteration of your 2nd for-loop. ...

10日 前 | 0

回答済み
Swapping entries in column of table
I'm not sure why you're using string characters instead of numbers but I'll assume you have a reason for that. Here's how to ide...

10日 前 | 0

| 採用済み

回答済み
What does the 'imfuse' output mean?
Regarding the line of code Fused = imfuse(Image3, Image4, 'falsecolor'); For the falsecolor method, by default, Fused is a com...

10日 前 | 1

回答済み
STROOP TEST- COGENT
The handle to the text object and the handle to the "square" (not sure what you mean here, it could be a rectangle object, a pat...

10日 前 | 0

| 採用済み

回答済み
On Startup: function name warning
None of the toolboxes are crashing - those are just warnings that you've got two functions with the same name. Don't delete a...

10日 前 | 0

回答済み
moving scroll index in a ui figure
TL;DR: Don't waste your time, it's not currently possible in AppDesigner (r2019b). Programmatically scrolling to a specific r...

10日 前 | 1

| 採用済み

回答済み
UIFigure Keyboard control update
"I am looking for an approach on how to provide the input control for the uifigure" Idea 1: add buttons to your App One approa...

10日 前 | 1

| 採用済み

回答済み
How can I save a figure within app designer?
update: try out copyUIAxes() from the file exchange copyUIAxes() recreates a UIAxes in a new figure. It copies the UIAxes child...

10日 前 | 2

Load more