Respondida
how i can have gradient of a multivariate function like f(x,y) in a single function?
If you want this for a specific function you can just create the function directly: >> g = @(x,y) [2*x,2*y]; >> g(1,1) ...

más de 10 años hace | 0

| aceptada

Respondida
How to calculate mean, standard deviation?
You can index a table by the VariableNames. Furthermore we can use the properties of logs: log(a/b) = log(a) - log(b). This will...

más de 10 años hace | 3

| aceptada

Respondida
Use a variable in Request user input prompt.
The identifier you are using in _sprintf_ (_%f_) stands for floating point, but you want a char array so use the identifier _%s_...

más de 10 años hace | 2

| aceptada

Respondida
for to parfor, Error: The variable h in a parfor cannot be classified.
You cannot assign to an index which depends on another variable inside a parfor loop. Instead you can assign to a temporary vari...

más de 10 años hace | 1

Respondida
How to display all this in a single msgbox?
You can use _sprintf_ to make these each into char arrays and place them into a cell array. Here's an example x = 12; ms...

más de 10 años hace | 1

| aceptada

Respondida
nancov gives strange results
When you use _nanstd_ each standard deviation is calculated only using the data for that column, so _nanstd_ can ignore all NaN ...

más de 10 años hace | 1

| aceptada

Respondida
Not enough input arguments in embedded function when using fsolve!
First off your function to be evaluated should accept only a vector as input. I notice you are providing an initial point: ...

más de 10 años hace | 0

| aceptada

Respondida
Problem with Portfolio Optimization, Mean Returns are not processed as vectors
The problem is likely due to the presence of all NaNs in one of your return series, which results in a NaN even using _nanmean_....

más de 10 años hace | 1

| aceptada

Respondida
cond() for sparse matrices
I would assume that the why has to do with the simplicity with which one can calculate the 1-norm of a sparse matrix. Both _cond...

más de 10 años hace | 0

| aceptada

Respondida
Using bndyield can "yield" complex roots.
The only reason that I could see this happening is if your Price of the bond is negative and your coupons are positive. Is there...

más de 10 años hace | 0

Respondida
find line handles related to legend entries
The legend will no longer store this information unless you pass it to the UserData. I would suggest returning the objects creat...

más de 10 años hace | 0

Respondida
How to calculate overlapping area of two cdf's?
You could approach this with a Riemann sum or trapezoid rule, but to do this you would want to analyze the density at the same p...

más de 10 años hace | 0

Respondida
Remove diagnostic information, iterations, estimate results..from screen from egarch fit
The documentation you will find online is always for the latest release of MATLAB. You are likely using a release prior which di...

más de 10 años hace | 0

| aceptada

Respondida
Exponentiation of Matrix Columns by different Powers
_repmat_ can be used to create a matrix bExp of the same size as A where the rows are repeated. bExp = repmat(b,size(A,1),1...

más de 10 años hace | 0

| aceptada

Respondida
assigning to object variables from within-object functions
If you want to have your original object updated you should make your class a handle class: classdef myClass < handle ...

más de 10 años hace | 2

Respondida
Issue with fprint() on a (2*3) matrix
MATLAB is a column major language, so when it reads in elements of A it reads in order A(1,1), A(2,1),...A(end,1),A(2,1),A(2,2),...

más de 10 años hace | 0

Respondida
Is there a way to manipulate the Font that is displayed in the Command Window?
In MATLAB under the HOME tab, select preferences -> Fonts This will give you the option you need.

más de 10 años hace | 1

| aceptada

Respondida
In parfor , why a variable cannot be classified?
Preallocate your matrix before the loop: Matrix = nan(n,9) Although lookingat your catch statement is Matrix a cell arra...

más de 10 años hace | 0

Respondida
how Matlab iqr works
MATLAB uses the prctile() function to find Q3 and Q1 to calculate the IQR. See <http://www.mathworks.com/help/releases/R2015a/st...

más de 10 años hace | 0

Respondida
Changing the marker type for the nth entry in plot
You would have to accomplish this as a second plot, since each Line has a MarkerStyle associated with all of the data points. To...

más de 10 años hace | 0

| aceptada

Respondida
How can I extract data from table keeping while keeping the floating point?
The only reason this would happen is if at least one of the columns is of class uint*, where * could be 8, 16, etc.. The issue i...

más de 10 años hace | 0

| aceptada

Respondida
index out of bounds error
You are using the find function and then assigning values based on that to the variable _Xidx2{kidx}_. If you use the debugger w...

más de 10 años hace | 0

| aceptada

Respondida
Parfor: Variable (Ind) is not sliced; Recommendations about my code?
Often times when you run into an error like this, your easiest solution will be to take the inside of the parfor loop and turn i...

más de 10 años hace | 0

Respondida
Create a table from symbolic vectors
The _table(var1, var2,...)_ function will create a table where the variables are the inputs _var1_, _var2_, ... What you want...

más de 10 años hace | 0

Respondida
undefine function or variable
Judging by what you have written and the error given it seems that your issue is with the capitalization. MATLAB is case sensiti...

más de 10 años hace | 0

| aceptada

Respondida
How do I delete the rows in amtrix wherre one column is less than another.
To delete the rows of *A* where the fourth column is not the largest value in that row, we just need to perform a logical compar...

más de 10 años hace | 1

Respondida
How to change color in a plot?
One thing you could do is just change the ColorOrder property of the axes itself: f = figure; colors = [0 0 0.7; 0.7 0 0...

más de 10 años hace | 5

Respondida
What is causing the error from matlab predict function? Also, how to format data to use in classifier validation?
Given the error it seems that maybe your data contains values which are not doubles (i.e. integers) which need to first be cast ...

más de 10 años hace | 0

Respondida
How to reduce execution time of a code in matlab R2013a
To reduce execution time, run the code in the Profiler. <http://www.mathworks.com/help/releases/R2015a/matlab/matlab_prog/pro...

más de 10 años hace | 2

Respondida
How to implement AR and ARMA model in data
Yes. This would be the function *arima* in the _Econometrics Toolbox_. We also have a course <http://www.mathworks.com/services/...

más de 10 años hace | 0

| aceptada

Cargar más