Answered
Index in position 1 is invalid. Array indices must be positive integers or logical values?
If you just want to be able to determine the mass for a specified identifier, I wouldn't use ismember in this case. I'd use a di...

3 years ago | 0

Answered
What is the answer of [(4 -2 ) /2 , 5 +6 , 7 , 8 ] ? Why does MATLAB output [1 5 6 7 8]?
See this documentation page for more information.

3 years ago | 0

Answered
Error: Reference to non-existent field 'A'. Changed between 2018 to 2022 versions?
Why is the specific text of the error message important for your application? If we had a typo in an error message and we corre...

3 years ago | 2

Answered
How to bubble sort incorporating deal function
There are a number of improvements I'd recommend you make to your code. close all; clear; clc; Don't use "close all; clear; cl...

3 years ago | 0

Answered
Change of properties of UI dynamic components (AppDesigner)
You don't appear to be storing the led array you created inside ApplyButtonPushed to any of the properties of your app, so it's ...

3 years ago | 0

| accepted

Answered
What is the purpose of zero function?
The zeros function is used there to preallocate the array. Rather than having to find a new block of memory to store the results...

3 years ago | 1

| accepted

Answered
invalid index in find function
There's no guarantee that the elements of x_axes (the points that you selected using ginput) are integer values. Therefore there...

3 years ago | 0

| accepted

Answered
R2022B Update4 is not offered
Please see the accepted answer on this Answers post.

3 years ago | 0

Answered
I can not receive activation key
If you are using your educational institution's or your company's license please contact the person or group that administers yo...

3 years ago | 1

Answered
how extract table RowNames based on table elements
I'd use ismissing, to avoid the need to extract the whole contents of the table into a separate array. % a table as you describ...

3 years ago | 0

Answered
Someone please help to rectify this error: Error using barrier Objective function is undefined at initial point. Fmincon cannot continue. Optimization problem
We can't run your code as we don't have all of the functions it uses, but what do you receive as an answer when you call obj_GOH...

3 years ago | 0

Answered
Run Fminsearch in a loop
Parameterize your costfunction. The "Minimize with Extra Parameters" example on the documentation page for the fminsearch functi...

3 years ago | 1

| accepted

Answered
Are there any matrix balancing/scaling function in matab for complex rectagular matrices?
I have a complex number matrix with 45 x 2 size. And it needs to be inverted. How exactly do you define inversion for a non-squ...

3 years ago | 0

Answered
Why calling the functions works fine in the first run, but causes error after that?
Don't assign the output from the function p1 to a variable named p1. If you do you will not be able to call the function while t...

3 years ago | 0

| accepted

Answered
riskfolio-lib / PyPortfolioOpt like functionality
I'm not familiar with those libraries but just based on the names I think the "Portfolio Optimization and Asset Allocation" cate...

3 years ago | 0

| accepted

Answered
How to use input string as a function in Appdesign?
If the user enters an expression in the edit field, you can convert it into an anonymous function using a couple of functions. ...

3 years ago | 2

Answered
How can I create an inherit class based on variable value?
You could create a function handle to the constructor then call that function handle. index = 2; % example fh = str2func("clas...

3 years ago | 0

| accepted

Answered
How to set contour levels
and I got the attached figure Contour1 with contour levels of 50 No, that syntax creates 50 contour levels. To specify a single...

3 years ago | 0

Answered
How do I wrap text using the disp or display function?
You could use the textwrap function to wrap the text manually. a = "The quick brown fox jumped over the lazy dog"; b = textwra...

3 years ago | 0

Answered
why do I receive not enough input arguments
Based on the function definition: function [y] = signal_avg_lim( filename, peaknumber, revsize ) your function can accept a ma...

3 years ago | 0

Answered
ind2sub with arbitrary martix
You have to specify the size of the array you want to use the subscripts to index into because the same linear index could gener...

3 years ago | 0

Answered
how to refrech XticksLabel when i zoom a graph in an app
Rather than calling datestr or datetick I recommend plotting using a datetime array as your X data. v = 0:10; y = v.^2; tenDa...

3 years ago | 0

| accepted

Answered
How to change the variable name after each run
Can you dynamically create variables with numbered names like x1, x2, x3, etc.? Yes. Should you do this? The general consensus ...

3 years ago | 0

Answered
How to change a bit from 0 to 1.
A = [7;19;12;11;23] B = bitset(A, 5) binA = dec2bin(A, 5) binB = dec2bin(B, 5)

3 years ago | 0

Answered
Curve Fitter tool-Center and scale
Suppose you wanted to fit a quadratic curve to the census data set. format longg load census plot(cdate, pop, 'o-') Let's bu...

3 years ago | 0

| accepted

Answered
Join timetable by time?
Do you want to join the timetables or do you want to synchronize them?

3 years ago | 0

Answered
(Enhancement Request) generated code for the "arguments...end" default argument syntax in matlab coder
Please send this enhancement request to Technical Support directly using the Contact Support link under the Get Support heading ...

3 years ago | 0

Answered
Writing a code to find area of polygon
This wasn't an option when the original question was asked but you could create a polyshape then call area on it. In this exampl...

3 years ago | 0

Answered
Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.
The ability to specify name-value pair arguments as "name=value" was introduced in release R2021a. So instead of this: options ...

3 years ago | 1

| accepted

Answered
How to import class definitions for typing
The full name of that class is not OtherClass1. It is subdir.OtherClass1. This insulates you from the possibility that some othe...

3 years ago | 0

| accepted

Load more