Réponse apportée
Parsing Complicated text file header
If the headers are uniformly formatted, you could simplify this a bit, but this should work: fid = fopen('data.txt'); s...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
problem with time step in ODE ?!
I don't know exactly what you're trying to do, because your code is invalid in the last line of |F10| and in your call to |ode23...

plus de 14 ans il y a | 0

Réponse apportée
one time Multiple data extraction from exel files for analysis
This basically just stacks all the spreadsheets on top of each other, adding a first column with the number, into one big cell a...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Non linear fit
Hmm... I thought I'd answered before, but apparently not. Oh well. As the cyclist says, the very tight spike in the middle mak...

plus de 14 ans il y a | 0

Réponse apportée
How do I fix a improper index matrix reference error
A few things that will help us diagnose the problem: # Format your code # Show the exact error message so that we know on wh...

plus de 14 ans il y a | 0

Réponse apportée
how to label lines on a graph
How about overlaying text on the graph, next to the lines? line(x,y) % or plot(x,y) with a hold on text(max(x),max(y),n...

plus de 14 ans il y a | 4

Réponse apportée
input argument is undefined
When you say "run the function", what do you mean -- you hit F5 or push the save/run button (with the "play" icon) in the Editor...

plus de 14 ans il y a | 0

Réponse apportée
Predefined "Settings" in R2011b
Where and how are you trying to reload them? In 11b I get the following: >> which Settings -all Settings is a built-in met...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
changing the X tick label
If |a| and |b| are numeric, then lbls = strcat(strtrim(cellstr(num2str(a(:)))),'-',strtrim(cellstr(num2str(b(:))))) set(...

plus de 14 ans il y a | 0

Réponse apportée
Not enough input arguments
From your comment to Jan: "then run it"... If you are running it as a script then it will give this error message because |te...

plus de 14 ans il y a | 1

Réponse apportée
CODE
Change the instances of |Params.zm| *in your subfunction |zr17t9001|* to just |zm|. (Leave them as they are in the main functio...

plus de 14 ans il y a | 0

Réponse apportée
having one "for" loop instead of two
As Walter said, you can't loop over two variables in the same |for|-loop. So the real question is: *why* do you want to do this...

plus de 14 ans il y a | 1

Réponse apportée
do not have the genetic algorithm function in the global optimization toolbox
If you're a student, then there's a pretty good chance your school has a license for Global Optim TB. You'll be constrained as ...

plus de 14 ans il y a | 0

Réponse apportée
strfind issue
As Daniel says, there must be more going on. Can you copy the code directly? |strfind| returns the indices; if there are no ma...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
CODE ASSISTANCE
I'm guessing it's a name conflict issue caused by your |load| command. Is |zm| loaded by the command |load saved_data;|? If so...

plus de 14 ans il y a | 1

Réponse apportée
Nesting loop reiterating wrong code
Nothing inside your outer loop (except the indexed assignment at the end) references the loop variable |f|, so you're doing exac...

plus de 14 ans il y a | 0

Réponse apportée
How to add letters to the end of words in a string.
|strcat(wordbank,'s')|

plus de 14 ans il y a | 7

| A accepté

Réponse apportée
loading .txt file
If you don't need individual variable names then I'd probably go with the simplest approach of data = dlmread('data.txt','',...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Baseball
The problem is really in the math. |fzero| can't find a zero from the given initial guess because your function has a nasty sin...

plus de 14 ans il y a | 0

Réponse apportée
Jacobi Iteration into Gauss-Seidel for Linear Algebra course
Your loop in |j| is effectively |1:(i-1)| then |(i+1):n|. The difference between GS and Jacobi is whether you use |x| or |xold|...

plus de 14 ans il y a | 0

Réponse apportée
Passing arguments into fsolve without using globals
1) Rewrite |myfun| to take two inputs: function Z = myfun(y,REF) ... 2) Use an anonymous function handle to make a fu...

plus de 14 ans il y a | 15

| A accepté

Réponse apportée
how isolate?
Can you clarify your question? If you want to extract portions of |x| you can just index: x(1:5) x(6:10) x(11:15) You...

plus de 14 ans il y a | 0

Réponse apportée
When to use find, loops or if?
Two things I notice in your code: # you're not using |j| to index into |rh| and |ch| -- is that intentional? # |find| is return...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
fminbnd finding wrong minimum point, please help
Don't expect |fminbnd| to do what you'd do in a Calculus class: look for local minima in the interval and compare with the endpo...

plus de 14 ans il y a | 1

Réponse apportée
Comparing two sets of coordinates
Can you please show your code? The approach you describe works in less than a second (~ 0.6) on my computer, with n = 10000. C...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Contour plot in Smith chart - how to do it?
Not sure what your X, Y, and Z are, but I assume it's something like |DC2RF| (Z) as a function of |Gmag| and |Gphase|. In that ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
ode step
Do you mean something like an internal variable in the rate equations? Not exactly. But why would you need this? The ode rate...

plus de 14 ans il y a | 0

Réponse apportée
Simulate a plain Call- and Put Option
It looks like there should be a function |call| that takes a bunch of inputs and returns the call price. Unless that function i...

plus de 14 ans il y a | 0

Réponse apportée
Distance between elements of two matrices
I think this is what you're after. It's a bit brute-force, but I can't think of a neater, vectorized way. % Make some ma...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
how can i plot all for loop's values
Why are you using a |for|-loop at all? These are all vectorized operations. th=-25:.1:50; fai=atand(((750+450.*sind(th)))...

plus de 14 ans il y a | 0

Charger plus