Réponse apportée
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)...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 3

| A accepté

Réponse apportée
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.

environ 15 ans il y a | 1

| A accepté

Réponse apportée
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 *<...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
How can I cut some digits from a number?
n = 121313.334242; fix(n*10000)/10000

environ 15 ans il y a | 1

| A accepté

Réponse apportée
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

environ 15 ans il y a | 7

| A accepté

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

environ 15 ans il y a | 2

Réponse apportée
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 ...

environ 15 ans il y a | 1

Réponse apportée
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.

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 15 ans il y a | 0

Réponse apportée
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:/...

environ 15 ans il y a | 0

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

environ 15 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 1

Réponse apportée
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...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 0

Réponse apportée
displaying subdata points within the same figure.
http://www.mathworks.com/matlabcentral/fileexchange/26007-on-figure-magnifier and the related links

environ 15 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 15 ans il y a | 0

| A accepté

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

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 4

Réponse apportée
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...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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. *...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 15 ans il y a | 0

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

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Loop problem
Then: Result = models(bsdata,:); You will draw rows direclty fro models.

environ 15 ans il y a | 0

| A accepté

Charger plus