Answered
Linear line, need it to curve
Couple issues. you only use r0 and ri in your equations, but you plot against r. This is why you see the straight lines. You wi...

6 years ago | 0

Answered
wrote the code but the error says Unrecognized function or variable 'a'. Error in firle (line 13) Z = A(a)*B(b);
The issue is with the line Z = A(a)*B(b); You have not defined the variable 'a' or 'b'. That is resulting in the error you see....

6 years ago | 0

Answered
"Index exceeds the number of array elements"
Use an index that is not greater than the dimension you are indexing. For example, if your array is a 1x2048, you will get this ...

6 years ago | 0

Answered
Removing Rows from Array Based on Date/Time Value in Cell
Ok, I'll take you through the steps I'd follow. I'll be sharing videos from our Exploratory Data Analysis specialization on Cour...

6 years ago | 0

| accepted

Answered
Adding text from calculation in app designer
You need to add the components to the Canvas first. You can then dynamically update the value in the code. I would use the "Edit...

6 years ago | 0

| accepted

Answered
Why this Matlab Funcation does not run and every time show such type of error
Because the last 10 lines of your code are outside the end that terminates the function. Fix that error, and then see what error...

6 years ago | 0

| accepted

Answered
Removing Rows from Array Based on Date/Time Value in Cell
Don't use datenums. I would suggest converting your dates to datetimes (segment{f,17}). Then you can just use regular conditiona...

6 years ago | 0

Answered
Do I need/How to add Functions in app designer
The most robust way to build your app is to have all the code contained inside it. You can include helper functions to include c...

6 years ago | 0

| accepted

Answered
Update plot using set() with xData and yData
When you plot multiple lines in a single plol, your handle is an array of line objects, one for each line. If you want to use th...

6 years ago | 2

| accepted

Answered
Increasing ticks on x-axis when using datenums?
This is handled automatically for you if you use datetimes. Use the function dateime to convert your time to a datetime. Then pl...

6 years ago | 1

| accepted

Answered
Fitting sigmoid data then determining value of x when y = 50%
Sigmoid models typically return a probability, and the 50% response corresponds to x=0. Therefore, you need to modify your equat...

6 years ago | 1

Answered
Fill boxplot with different colors using RGB-Codes
It looks like you already found this post? Note that RGB values range between 0 and 1, so divide your color vector by 255. colo...

6 years ago | 0

| accepted

Answered
peaks finding in a graph
A good way to play around with settings until you get what you want is with the Find Local Extrema task in a live script. See he...

6 years ago | 0

Answered
Index in position 2 exceeds array bounds (must not exceed 2).
You define Coord to be a 5x2 array Coord=360*[2 1;2 0;1 1;1 0;0 1;0 0]; Since Coord only has 2 columns, you can't ask for a c...

6 years ago | 0

Answered
anyone can help me how to find the oldest person in a room?
No. This returns the persons age. You want the index, so you'll have to do this in 2 steps. See the documentation for max to see...

6 years ago | 3

| accepted

Answered
Remove stop words from a cell array
Do you have the text analytics toolbox? You must because you are using stopWords. Try using the removeStopWords function.

6 years ago | 0

| accepted

Answered
Can I update the units/properties of a time table using the head function?
If you are asking if MATLAB can automatically extract units from the column name (e.g. Time (mins)), the answer is no. You would...

6 years ago | 0

Answered
How to change the scale of plot axes? How to plot circle using separate x and y equations?
Try adding 'axis equal'. You can see additional options here. You already have the equations for getting X and Y of a circle. T...

6 years ago | 1

| accepted

Answered
How to put row in gui?
See this page in the documentation. Your values get added to the 'Data' property. You can also see some examples in the the uita...

6 years ago | 0

Answered
Save button in GUI Matlab
Here, your code could be something like this. Keep in mind variable scope in functions. If the specified variables do not exist ...

6 years ago | 1

| accepted

Answered
Match column of a table to column of another table of different height
You could try using the Join Tables task in the live editor. This would allow you to interactively try various settings until yo...

6 years ago | 1

Answered
How to select values in an array until a known value
I would probably use find. Identify the index of the peak value Identify the threshold value Using the index in #1, find the ...

6 years ago | 0

Answered
How to print \ in fprintf?
You have not specified the formatspec input argument. Even with that, special characters like a backslash need to be handled dif...

6 years ago | 1

Answered
Why is the same variable displayed colored and uncolored?
There is a warning associated with the blue D. Hover over it to see. I suspect the issue is that you have accidentally included...

6 years ago | 0

| accepted

Answered
Finding and replacing numbers with NaN
I would suggest using the standardizemissing function. I don't think you are going to be able to get around having to make a lis...

6 years ago | 0

Answered
How to check if button is pressed in app designer?
A simple solution would be to create a property in the app, say something like "app.isSingle". If the "Single Image" button is p...

6 years ago | 0

Answered
I'm getting this error with syms, do you know how can I fix it?
I cannot reproduce your error. Try restarting MATLAB?

6 years ago | 0

Answered
Creating a loop in matlab
The values of x, y, z and logic are overwritten each loop with the new values. These repeats each loop until the final loop, giv...

6 years ago | 0

Answered
Plot 2D-histogram for X and Y
A couple issues to be aware of. You are using a different colormap. It looks like the goal image is using Jet. Your X and Y va...

6 years ago | 1

Answered
How can I count the no of data points in circular grid?
Use the inpolygon function. This will return a logical array of the data points inside your polygon. Sum the logical array to ge...

6 years ago | 0

Load more