Respondida
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...

más de 3 años hace | 0

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

más de 3 años hace | 1

| aceptada

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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. ...

más de 3 años hace | 2

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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 ...

más de 3 años hace | 0

Respondida
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)

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

| aceptada

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

más de 3 años hace | 0

Respondida
(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 ...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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 ...

más de 3 años hace | 1

| aceptada

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
How can I rewrite this to get peak locations?
Perhaps the islocalmax function with the dim input argument will meet your needs.

más de 3 años hace | 0

Respondida
Using a function and fsolve with a for loop
Either remove the section of code starting with "T = 1:1:40;" from your function file and run it in the Command Window or anothe...

más de 3 años hace | 0

Respondida
Unexpected behavior from FMINSEARCH when using zero or very small initial guess
Take a closer look at the message the last fminsearch call showed you that states why it completed the optimization. Optimizati...

más de 3 años hace | 0

Respondida
Is there a utility to check an MCR install?
What does "neither program will run" mean in this context? Do you receive warning and/or error messages either when you create ...

más de 3 años hace | 0

Respondida
How to alter a bit
I agree with Jan that the actual format of your data is not clear to me. In the first block of code below A does not contain the...

más de 3 años hace | 1

Respondida
I am trying to disallow the user from inputting non-sense answers.
You are missing at least one check. In addition, since the code that gets executed if any of your if statements are satisfied th...

más de 3 años hace | 0

Respondida
How to fix anomalies in graphs
It looks like you may be calling plot with x data that is not sorted. Compare plotting a sine curve with sorted data: x = 0:360...

más de 3 años hace | 1

| aceptada

Respondida
distributionFitter: Lognormal distribution
I am pretty sure that the data and the frequency arrays are positive (>=0). 0 is not positive. What does this command show? a...

más de 3 años hace | 1

| aceptada

Respondida
i want to guide edit output has number+text
Like this? z = uicontrol(Style="edit"); n = 25; z.String = string(n*1j);

más de 3 años hace | 0

Respondida
Matlab file MAC - Script Error
Did you already have a copy of the file in the directory to which you downloaded? I'm not sure if Mac behaves the same way as Wi...

más de 3 años hace | 1

Cargar más