Answered
What changes are needed in the code?
See this answer. p = [1 2]; s = 'orange'; s(p) = s(fliplr(p))

4 years ago | 0

Answered
Quiver plot for Wind data of reanalysis
Part of the issue is a mismatch between your coastline data and your quiver data. If you zoom all the way out, you will see what...

4 years ago | 0

| accepted

Answered
Error when calling a PushButton programetically in Appdesigner
Pushing a button just triggers the execution of a specific callback function. However, you can also call callback functions manu...

4 years ago | 1

Answered
How to scatter plot using different colors by using own RGB data?
Color is the 4th input to scatter. scatter(x,y,sz,c) You have placed it in the 3rd spot, which is for size. What happens if yo...

4 years ago | 0

Answered
Change the name associated with my license
You should be able to edit your name in your profile https://www.mathworks.com/mwaccount/profiles/edit Your name is also showi...

4 years ago | 1

Answered
How can I open a port in Matlab 2021 version?
You do not need to use fopen when using serialport. See this page: Transition Your Code to serialport Interface As an example...

4 years ago | 0

Answered
How do you find data points that match a specific value?
I would use groupsummary. If you group by z, the resulting table automatically contains a group count. x=randi(10,100,1); y=ra...

4 years ago | 0

Answered
Is there any built-in function for splitting the data to training and testing sets ?
Yes. The one that comes to mind is cvpartition.

4 years ago | 0

| accepted

Answered
How to create an array?
See the examples on the for loop documentation page. You can also learn how to do this interactively in Ch 12 of MATLAB Onramp.

4 years ago | 0

| accepted

Answered
Can't get trial licence in Germany
Contact support.

4 years ago | 0

Answered
Categorical Bar Plot keeps old categories
That is the expected behavior of the categorical datatype. The list of possible categories is maintained, even if they are not p...

4 years ago | 0

Answered
MatLab App Design - how to use default value for Edit Field function?
The code you have shared is for capturing the value in the edit field, not setting it. Also, keep in mind that callback function...

4 years ago | 0

| accepted

Answered
how can I delete from a string a couple of lines I have indexed
If it is a string array, and you want to remove a portion of a string in the array consider using eraseBetween: newStr = eraseB...

4 years ago | 2

| accepted

Answered
how can i obtain this?
You have not shared your code so it's a little challenging to say what is happening, but if I were to start with a 51x71x3 matri...

4 years ago | 0

Answered
How to solve this problem.
The function svmtrain was removed starting in R2019a From here: svmtrain and svmclassify have been removed The svmtrain and s...

4 years ago | 0

Answered
loop do add easy part
I would do this M = [0 3.5304 8.7190 13.8538 16.9663 21.4803 0 3.4610 8.6222 13.8627 16.9212 ...

4 years ago | 1

| accepted

Answered
MATLAB Grader: Learner solution.m missing? No such file or directory.
I can get the same error message if I try to use fileread('solution.m') on a function type problem. Note that for function ty...

4 years ago | 0

| accepted

Answered
Convert tablet to matrix
There may be an easier way, but here's what I came up with. Read in your grades as categoricals Rename the categories for grad...

4 years ago | 0

| accepted

Answered
displayFormula in LiveScript giving me a red triangle with a question mark - and NO explanation!
I can't say why it is doing what it is doing. However, some playing around determined the following. It appears when a string e...

4 years ago | 0

| accepted

Answered
How can i run the same scripts of Matlab in Matlab app design?
You get the same error if you run your script in MATLAB (after commenting out the lines starting with app.). The issue is that t...

4 years ago | 0

| accepted

Answered
Unable to get the coursera license for Stanford's Machine Learning class
There was an issue with the licensing server used for those course licenses. It has since been resolved. You should be able to a...

4 years ago | 0

Answered
How to fix a colormap
Your colormap isn't changing, but by default MATLAB scales the colormap to the range of data in the plot. If your first surf plo...

4 years ago | 0

| accepted

Answered
Calling .m file in app designer that will need to call another .m file to execute the code
You can execute m-files by calling them by their name in your code. To ensure your app can find the scripts, either place them i...

4 years ago | 2

| accepted

Answered
Invalid indexing or function definition.
Remove the (t) from the output variables for dsolve. It is treating t as an index. [y1Sol,y2Sol,y3Sol,y4Sol,y5Sol,y6Sol,y7Sol,y...

4 years ago | 0

Answered
Unrecognized function or variable in APP DESIGNER
Keep in mind variable scope. Variables created inside a function are destroyed as soon as the function ends. You need to add tho...

4 years ago | 1

| accepted

Answered
Dot indexing does not support negative variables in a loop - how to solve?
It looks like you may already be using n as a variable elsewhere in your code, so you probably need to clear it before trying to...

4 years ago | 0

| accepted

Answered
Sorting rows by a specific value
There are a couple ways to do this. What works best depends on your data. You can use sortrows to sort your table keeping rows t...

4 years ago | 0

Answered
With cvpartition, how to stratify the partitions with respect to more than one variable (with respect to class label and some other label)
The documenation seems to indicate that grouping can only be done on a single variable. The workaround, then, might be to use fi...

4 years ago | 2

Answered
If Statement in a table
Have you defined i? If not, it is sqrt(-1). There error means i is either a decimal or negative number. A=1:3; % Works A(2) ...

4 years ago | 0

Answered
MATLAB command to calculate the value of sin(0.5pi)+27+2i-2
I suggest going through a couple chapters in MATLAB Onramp.

4 years ago | 0

Load more