Answered
Index exceeds the number of array elements. Index must not exceed 2. LINE x(k)=D(4);
The error message means you are trying to exist an element that does not exist. Your veriable only has 2 elements and your index...

3 years ago | 0

Answered
How to use result of a list in matlab app designer?
See the listbox properties. In general, the way you program components in app designer is using callback functions. These are ...

3 years ago | 0

Answered
Real time audio data plot from COM/serial port
fopen does not work with a serialport object. See the available methods here: https://www.mathworks.com/help/matlab/ref/serialp...

3 years ago | 0

Answered
Calling a function in App Designer
Rather than having an external function, I would incorporate the function into your app. You can either incorporate it into the ...

3 years ago | 0

| accepted

Answered
Plotting Day and Time from csv file
With your data as datetimes, there is no good way to crop out the missing days, and workarounds I might try are cumbersome. Sinc...

3 years ago | 0

| accepted

Answered
Cell array gets updated with NaN values after the first run
I see slightly different behavior than what you describe. There are a couple issues, but the one causing the NaNs is your value ...

3 years ago | 0

Answered
why I got orange warning about contour plot?
See the description of the function handle input on the fcontour documentation page "Specify a function of the form z = f(x,y)....

3 years ago | 1

| accepted

Answered
Error in paths.
According to the error message, either the file or the folder you are trying to access does not exist. 'C:\MS EKECTRONICS\Semic...

3 years ago | 0

Answered
Lowpass filter not making any difference
The reason your lowpass filter is not working is because your filter settings are not aggressive enough to both pass your low fr...

3 years ago | 1

| accepted

Answered
I want to find a Data set file used in an example in MathWorks website
Beginning in R2023a, the product documentation is no longer installed by default (see here). You may have noticed when you insta...

3 years ago | 0

| accepted

Answered
need help with this task in matlab onramp final project
You appear to have replaced the for loop rather than adding the if statement to it. If I take the code you have shared and add ...

3 years ago | 0

Answered
How to modify a sine wave
Pick a threshold, and then set anywhere the absolute values of your signal are greater than the threshold equal to the threshold...

3 years ago | 1

Answered
Plot legend labels using loop
data = rand(100,16); plot(data) legend("data " + (1:size(data,2)))

3 years ago | 0

| accepted

Answered
Plot contour with "concave" XY coordinates
The interpolation employed by griddata is causing this. You could look into adjusting the method used, but I did not have much s...

3 years ago | 0

| accepted

Answered
How to crop the coin circular and neglect the rest area?
I would use the Image Segmenter app. After loading the image, you can define a circuilar ROI, apply a mask, and export the resul...

3 years ago | 2

Answered
Datetime differences but ignoring years
You can't just drop the year from a datetime variable. It's there, even if your viewing format does not display it. To me, that ...

3 years ago | 0

| accepted

Answered
Help me convert this Equation
As written, you need to either include your final denominator in parentheses, or divide by Dynamic_Viscocity. We have to take t...

3 years ago | 0

Answered
Plot multiple irradiances as one average
You haven't shared your data, which will impact how this can be done, but I suggest looking into groupsummary. In particular, if...

3 years ago | 0

Answered
Code for a project, giving me an error stating unrecognized function or variable 'mass'. What is the fix?
The most likely reason is that you have not yet defined a variable mass. design_parameters = size_auv_design(mass, length, wid...

3 years ago | 0

Answered
how can make 3bar plot xylabel for string?
You are creating variables. You need to modify your syntax to use the xlabel and ylabel functions. Also, labels apply to the wh...

3 years ago | 0

| accepted

Answered
I'm trying to connect my arduino kit to matlab but it seems that i have error using fread.
Have you installed the MATLAB Support Package for Arduino Hardware? You can find instructions here. I suggest going though the ...

3 years ago | 0

Answered
How to use a matrix as input for NLARX
I think this line in the Comma-Separated Matrix Pair description is the issue: "specify data as a pair of Ns-element numeric col...

3 years ago | 0

| accepted

Answered
how to find the most used letters in a text?
See this answer: https://www.mathworks.com/matlabcentral/answers/454036-count-letters-in-a-large-text-txt?s_tid=srchtitle

3 years ago | 0

Answered
como ultrapassar esse erro
Parece que haya creado un variable llamado int. % Para recrear el error (el mensaje es un poco diferente en R2023a int=5; sy...

3 years ago | 1

Answered
MATLAB keeps returning that the statement is not inside any function, and has a parse error, even though both are clearly defined already. How do I fix this?
In a MATLB script, all functions must be defined at the bottom (or below) the script code (see here). Move main() to the first...

3 years ago | 0

Answered
When I run this function, it generates a graph with only the x-value of -2, why wont it plot the whole vector?
Because you specified a step size of 20, but min and max of -2 and 2. Since the colon operator stops once the next increment wou...

3 years ago | 0

| accepted

Answered
Append results into an array in a for loop as in python
Not sure what the desired results are, but here's a sample of your code. It works as I'd expect. Perhaps you can be more clear o...

3 years ago | 0

| accepted

Answered
Trojan is detected in Matlab files
The official installer contains no malware or viruses. If you are using Defender, please update your definitions and try again. ...

3 years ago | 0

Answered
Is there a way to plot multiple boxplots in a subplot?
Sure. Turn your condition (0, 1, 3) into a categorical array, and use that to group your data using boxchart. % tiledlayout(3,1...

3 years ago | 1

| accepted

Load more