Respondida
How do a textscan to read the value in the line above the strmatch
fid = fopen('C:\Users\Oleg\Desktop\test.txt'); out = textscan(fid,'%s%f%f%f%f%f%f%f%f%f%f\r\n%f%f\r\n%f','CollectOutput',1)...

alrededor de 15 años hace | 0

Respondida
How to name variable in each incremental loop?..
Don't do that: <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F faq 4.6> (read til...

alrededor de 15 años hace | 3

| aceptada

Respondida
Inputdlg respond to enter?
You can modify inputdlg so that the focus is automatically set on the enter button otherwise you have to push tab before enter.

alrededor de 15 años hace | 1

| aceptada

Respondida
mldivide condition number
No you cannot. Explicitly means you are using *<http://www.mathworks.com/help/techdoc/ref/cond.html cond>*? Did you try the *<...

alrededor de 15 años hace | 0

Respondida
3 eq 3 unknowns big mess
With the optimization tb: f=@(x)[7939*cos(x(2))*sin(x(3))/100-9*cos(x(2))*cos(x(3))/20-367*sin(x(2))/50+441/200; 793...

alrededor de 15 años hace | 0

Respondida
finding endpoints of a label
Based on the idea of http://www.mathworks.com/matlabcentral/answers/10293-finding-neighbor-of-a-position I = [0 0 0 0 0...

alrededor de 15 años hace | 0

| aceptada

Respondida
finding neighbor of a position
*EDITED: should be fine now* I =[ 1 0 0 2 5 0 0 0 3 0 0 0]; l = 8...

alrededor de 15 años hace | 1

| aceptada

Respondida
How can I cut some digits from a number?
n = 121313.334242; fix(n*10000)/10000

alrededor de 15 años hace | 1

| aceptada

Respondida
how can I convert a decimal to an integer?
* fix to strip all the decimals * round can change the integer part fix (1.9) % 1 round(1.9) % 2

alrededor de 15 años hace | 7

| aceptada

Respondida
Boxplot Data
It way easier to calculate the stats: min max quantile(x,[.25 .5 .75]) mean

alrededor de 15 años hace | 2

Respondida
AssetPaths
You can declare a <http://www.mathworks.com/help/techdoc/ref/function.html function> only in a separate m. file and only as the ...

alrededor de 15 años hace | 1

Respondida
How do I simplify this code (remove for loop)?
idx = acos(rel_vec * vec_array) > pi/2; rvec(:,idx) = -rvec(:,idx); where _rel_vec_ is 1 by 3.

alrededor de 15 años hace | 0

| aceptada

Respondida
Dummy variables and explanatory variables in ARMA/GARCH models
Huge limitation and not only this one: the answer is *NO* to both. Look here for an unanswered question i posted some time ag...

alrededor de 15 años hace | 0

Respondida
constrained least square fitting
You can use <http://www.mathworks.com/help/techdoc/ref/lsqnonneg.html lsqnonneg> or if you have the Optimization TB then <http:/...

alrededor de 15 años hace | 0

Respondida
Function to read find title of an excel column
Import the excel sheet: [data, text] = xlsread(...); Now, use: idx = strcmpi(text(1,:),'HeaderIamLookingFor') d...

alrededor de 15 años hace | 1

| aceptada

Respondida
Garch meanForecast in loop?
* You're overwtiting everytime the variables * ??for i:1:i?? DO NOT increase the looping index _i_ inside the loop * DO NOT us...

alrededor de 15 años hace | 0

Respondida
Extracting everything from a structure
Don't do that: http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F Think if you had 2...

alrededor de 15 años hace | 1

Respondida
Is there a smarter way to create a large vector, with repeated numbers in a diminishing quantity?
Using <http://www.mathworks.com/matlabcentral/fileexchange/6436-rude-a-pedestrian-run-length-decoder-encoder rude> for run lengt...

alrededor de 15 años hace | 0

Respondida
insert into array with probability
% Create sample a and cf a = randi([1,100],4,1); cf = rand(4,1); cf = cf/sum(cf); % Suppose our b has 1000 elemen...

alrededor de 15 años hace | 0

Respondida
displaying subdata points within the same figure.
http://www.mathworks.com/matlabcentral/fileexchange/26007-on-figure-magnifier and the related links

alrededor de 15 años hace | 1

| aceptada

Respondida
retrieve value from specific location of matrix
use <http://www.mathworks.com/help/techdoc/ref/sub2ind.html sub2ind> to create from coordinates an index that points to the posi...

alrededor de 15 años hace | 0

| aceptada

Respondida
solve nonlinear equation
You cannot <http://www.mathworks.com/help/toolbox/symbolic/solve.html solve> a function handle. You have to convert the anonymo...

alrededor de 15 años hace | 0

Respondida
Plot different colors while using loops.
you can simply, and it will automatically change the colors for each series: plot(array1,array2,'o') Check out the <http...

alrededor de 15 años hace | 4

Respondida
how add multiple lines on 2 overlapped plots and brush all
X1 = {1:10,5:14}; Y1 = {cos(1:10),rand(10,1)}; X2 = {3:6,1:8}; Y2 = {sin(3:6),rand(1,8)}; numE = numel(X1); ho...

alrededor de 15 años hace | 0

| aceptada

Respondida
Confidence Interval for an extreme value distribution
http://www.mathworks.com/help/toolbox/stats/bqt29ct.html look for extreme value or generalized extreme value distributions. *...

alrededor de 15 años hace | 1

| aceptada

Respondida
Creating an inline-function in dependence of a parameter
c = 5; f1 = inline([sprintf('%d',c) '*x^2']) f2 = str2func(['@(x)' sprintf('%d',c) '*x^2']) isequal(f1(2),f2(2)) % ok...

alrededor de 15 años hace | 0

Respondida
Garch forecasting
You have to fit (garchfit?) the past history (X) to retrieve the coefficients and supply them to: Spec = garchset(...,'Regr...

alrededor de 15 años hace | 0

Respondida
Stepwise regression with no Constant
It doesn't say so neither in <http://www.mathworks.com/help/toolbox/stats/stepwisefit.html stepwisefit> nor in <http://www.mathw...

alrededor de 15 años hace | 0

Respondida
Plotting a simulated forecast?!
You can plot the price against the forecast: plot(1:100,price) hold on plot(1:100,meanForecast,'or') Or you can pl...

alrededor de 15 años hace | 0

| aceptada

Respondida
Loop problem
Then: Result = models(bsdata,:); You will draw rows direclty fro models.

alrededor de 15 años hace | 0

| aceptada

Cargar más