Answered
Bar series plot, transparent colors on the bars
Try the solution I have pasted in another post ... just last night. I have made a function which creates the patches necessary t...

10 years ago | 0

| accepted

Answered
Create a row matrix with different step size
Just utilize the concatenation operator *[ ]* x = [1:4 100:50:200];

10 years ago | 2

| accepted

Answered
Fit a constant only linear regression model using 'fitlm'
If you wanted to fit this using fitlm you could do the following: fit1 = fitlm(ones(size(y)),y,'y~1');

10 years ago | 0

| accepted

Answered
Minimization problem involving matrix norm
The 2-norm by itself is a non-linear operation, so you will want to use *fmincon*. Really any matrix norm will be non-linear, so...

10 years ago | 0

Answered
In an assignment A(I) = B, the number of elements in B and I must be the same.
It appears in this code that all of the values on the RHS are scalars, so this should not be an issue. That being said somethin...

10 years ago | 0

Answered
Matlab : put transparancy on a bar plot
A) The bar series will only have a 0x0 GraphicsPlaceholder as a child (so no properties for the bars Children) B) The barseries...

10 years ago | 1

| accepted

Answered
How to plot a normalised cumulative histogram
If using 2014b or higher you can use the histogram command: histogram(CharPoly,'Normalization','cdf') If prior to 2014b ...

11 years ago | 1

| accepted

Answered
How to make radio button user interactive?
You just need to set the radiobutton's callback function: <uicontrol%20http://www.mathworks.com/help/matlab/ref/uicontrol.htm...

11 years ago | 0

| accepted

Answered
why getting infeasible solutions using fmincon? (Update)
fmincon is a gradient based solver and as it is a discretized version of the optimization problem these are approximated by the ...

11 years ago | 0

Answered
nonlinear least squares function
If you call your objective function with the variable mas are there any NaNs or Infs in it? any(isnan(myfun(mas))) || any(i...

11 years ago | 0

| accepted

Answered
How to set axis scaling?
In versions 2014b or later you can use the properties: XLimSpec, YLimSpec and ZLimSpec by setting these properties to 'tig...

11 years ago | 2

Answered
Why getting different solutions by suppying same constraint to fmincon in two similar way (linear and nonlinear))?
One possibility that I could see here is in the difference between how fmincon would treat the derivatives of linear and non-lin...

11 years ago | 1

| accepted

Answered
How to read a numeric column from a csv file?
csvread only reads in numeric data, so if you do have non-numeric data you can use xlsread on the csv file. There are other lowe...

11 years ago | 1

| accepted

Answered
is it possible to define global title on figures?
Yes this is possible by creating a new axes which takes up much of the figure. Then a title for this axes. Turning the axes Vis...

11 years ago | 9

Answered
Dummies on dates MATLAB
We can do this with the ismember(A,B) function, which returns a logical vector the length of A indicating whether the correspond...

11 years ago | 0

| accepted

Answered
ARMA-GARCH model and dummy variables MATLAB
The second input to the estimate function should be the "univariate time series", so we cannot pass a matrix as this argument. ...

11 years ago | 0

Answered
Why i dont see my image after pca analysis?
So the fact that you have an indexing: II=I2(:,:,1); implies that II is a m-by-n-by-1 array (3-dimensional array). The _...

11 years ago | 0

Answered
Problems with a Newton-Raphson code
You have a line: while abs(f(p)) > 1e-6 which is an indexing into the variable *f* , with the indexing variable *p*. But...

11 years ago | 1

Answered
Use Kernel Density Estimation to get the probability of a new observation
The pdf integrates to be 1, so I am not sure why you think it needs to be normalized? Furthermore, this gives you a continuous d...

11 years ago | 3

| accepted

Answered
Declare a plotted Line in an image as a variable and not a Matlab graphics chart line?
What kind of processing do you need to do? You can still access the information from the returned object: YL = plot([1 size...

11 years ago | 0

Answered
how can i get the minimum total from the three total since it only display the final value of the total.
You are changing your looping variable inside the loop. I think you want: a = [4;1;9]; b = [3;1;4;6;7]; c = zeros(3...

11 years ago | 0

Answered
How can I fix the Error in Summation: (Attempted to access f(2); index out of bounds because numel (f)=1).
You only ever assign a scalar value to f, and continuously overwrite the previous version which was there. Not sure what your in...

11 years ago | 0

Answered
MATLAB : user choose the limits of the xaxis
The following code creates a plot of the input data. It has 2 text boxes which are editable and upon pushing the 'Update' button...

11 years ago | 0

| accepted

Answered
How to constrain a vector when using fmincon?
Please format your question so it is easier to read. Is K one of the design variables for the fmincon call? If so, then you j...

11 years ago | 0

Answered
Variable names in loop?
Sure there are multiple ways to do this. 1. Assuming all of the files are in the same directory (I assume the working) we can...

11 years ago | 1

Answered
rand matrix for FM
How about you create a random matrix and then subtract from each element the sum(matrix(:))/numel(matrix). n = 4; A = ra...

11 years ago | 0

Answered
How to use fmincon to optimize two control vectors of a function?
In the optimization routines in MATLAB the objective function needs to take all of it's design variables as one input. So in yo...

11 years ago | 4

| accepted

Answered
Improve calculation time with plots
I would suggest taking a look at the drawnow command. docsearch Animating Line Graphs This example should help you. (Not...

11 years ago | 0

Answered
How to avoid going through unnecessary functions when tracing fmincon in Matlab to findout it call the right objective and constriant functions.
Sorry no one got to this one yet. The _which_ command will tell you the location of the file which MATLAB finds first on its se...

11 years ago | 0

| accepted

Answered
MAtlab certification in Pakistan
These certifications are only offered at a limited number of locations. The only current offerings for the certification are li...

11 years ago | 0

Load more