Answered
Display a string output in a Edit Field Text box in App-Designer
You have split your code between two different callback functions. However, only one will execute when a user inputs a value. F...

5 years ago | 1

Answered
not enough input arguments
You have not set up your objective function correctly, and then you are also not passing it correctly to particleswarm. From th...

5 years ago | 0

| accepted

Answered
Plotting table into bar graph
The bar chart you show has 3 groups of 2. I'm not seeing how you want to create groups with your data. Perhaps start by just cr...

5 years ago | 1

| accepted

Answered
How to sort a table or Excel file (.xlsx) (.csv) and sort the labels correspondingly?
In MATLAB, you would use sortrows. name = ["a";"b";"c"]; val = [1;3;2]; T = table(name,val) Tsort = sortrows(T,'val')

5 years ago | 0

Answered
How to plot this?
Ch 9 of MATLAB Onramp covers plotting. If you don't know where to start, you may find the other chapters helpful as well. You m...

5 years ago | 0

Answered
Mesh grid from 3-column table
I think you could achieve something like that using sortrows and reshape. x = [1;2;1;2]; y = [3;3;4;4]; z = randn(4,1); tdat...

5 years ago | 0

Answered
Must Return Column Vector Error
Your numdist function is returning an array. It must be a column vector. Using the colon will resolve this error if it's done in...

5 years ago | 0

| accepted

Answered
How do I download Matlab files in one computer and install in a different computer?
Perhaps these instructions on performing an offline installation will help.

5 years ago | 0

Answered
Finding position of value in an array
The first thing that jumps out to me is that you replace your x value with your counter value. As the loop progresses, your if s...

5 years ago | 0

| accepted

Answered
Undefined function 'power' for input arguments of type 'function_handle'. for some Implicit function
I'm not able to recreate the same error message. It would appear the code you have shared here does not match the code you are r...

5 years ago | 0

| accepted

Answered
How to stop rounding values when i use array?
By default, MATLAB only displays 4 decimal places. This does not change the actual value. It's just for display. You can modify ...

5 years ago | 1

| accepted

Answered
Simple code Error PLease help me
Use an elementwise operator when dividing by an array. f=@(x) 50*x*1e-6-1./(15*x*10^-3)-11/360; % ^^ fplot(f,...

5 years ago | 0

| accepted

Answered
Produce the same result but without using a for-loop.
This is a piecewise function. Perhaps the easiest way to do this is using the piecewise function. If your assignment doesn't al...

5 years ago | 0

Answered
Uninstall Old version R2020a
That is not how you uninstall a program. Perhaps the uninstall instructions in this answer will better guide you: https://www.m...

5 years ago | 0

Answered
I am having the error of array indices must be positive in this code.
At least one of your indices is not valid, meaning it is either a non-integer value, or <=0. Here, the issue is that your vector...

5 years ago | 0

Answered
why did i get error of "The function or variable 'smoothtrajectory' is not recognized" of automated driving toolbox
If you scroll to the bottom of the documentation page, you can usually see when a particular function was introduced. For smooth...

5 years ago | 0

Answered
set variable in App Designer
Variables in an app are considered properties. See the Share Data Within App Designer Apps for how to create the property and th...

5 years ago | 0

| accepted

Answered
Data Visualization in Matlab
Tall arrays allow you to apply statistics, machine learning, and visualization tools to data that does not fit in memory. See V...

5 years ago | 0

Answered
Index in position 1 is invalid. Array indices must be positive integers or logical values. Error in qg_i (line 12) D=divergence(x,y,i_x,j_y);
The code you have shared works fine for me. Try clearing your workspace before running. If you still get the same error, you mus...

5 years ago | 0

Answered
Time and date fields not correclty imported using readmatrix
You cannot mix data types when you use readmatrix, meaning all the data you import must be of the same data type. That is why yo...

5 years ago | 2

| accepted

Answered
Use ODE45 solution as new input to the main code
Perhaps I don't understand the problem, but it seems like all you need to solve for the position of the third object is t and it...

5 years ago | 0

Answered
How to plot while loop iteration in same figure
Use hold on and hold off as appropriate. You can learn more about them in Ch 9 of MATLAB Onramp.

5 years ago | 0

Answered
Unique function is not working as expected
First, do not name your table variable table. That overwrites MATLAB's function for constructing tables. When I look at your ex...

5 years ago | 1

| accepted

Answered
How to read .txt separate by - and in dms format
I was trying to avoid using a formatspec, but I can't think of a good way. Here's how I would probably do it. The result is a ta...

5 years ago | 0

Answered
Removing NaN values and outliers
You can greatly simply your task by using the rmmissing function. R = rmmissing(A) If A is a matrix or table, then rmmissing r...

5 years ago | 1

| accepted

Answered
Warning: Temporary folder could not be deleted
I suspect this has to do with you saving to a Dropbox folder. My guess is that Dropbox is doing something with the file when MAT...

5 years ago | 0

Answered
How can I use plotTransforms in App Designer?
I will confirm that the R2020a documentation states that the parent for plottransforms can be an axes of a uiaxes. When I tested...

5 years ago | 0

| accepted

Answered
How can I plot Streamline from a stream function?
https://www.mathworks.com/help/matlab/ref/streamline.html

5 years ago | 0

| accepted

Answered
Assigning names to values of an array
Combine the names and value into a table first? Atbl = table(names,values) Learn more about accessing data in a table here.

5 years ago | 0

Load more