Réponse apportée
Probability of being under a target
Counting the number of samples with a given criterion is easy enough: threshhold = pi; nnz(X < threshhold) The |ecdf|...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Conditionally Flip Sign in Table
One liner: A(strcmp(A(:,1),'No'),2) = strcat('-',A(strcmp(A(:,1),'No'),2)) Slightly cleaner with two lines: idx = s...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
connecting points in scatter3 plot?
OK, now I understand the problem. The issue isn't that the data is representing 3-dimensional *points*, but that it's stored in ...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Overwrite empty cell array with strings
If |rowofstrings| is a 1-by-41 cell array then your first line will work if you change the |{}| to |()|: MasterCellArray(2,...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
connecting points in scatter3 plot?
What about |plot3|? plot3(rand(5,1),rand(5,1),rand(5,1),'o-') But I also don't understand what the problem is with |line...

presque 12 ans il y a | 1

Réponse apportée
Hi. How can i rectify my error i.e., not enough arguments
How are you calling this function? It has to be called with two inputs: foo = erlang_b(pi,42) The error you're getting ...

presque 12 ans il y a | 0

Réponse apportée
How can I stop an ODE overwriting variable values?
If I understand correctly, your ODE function takes in |t| and |y| (and possibly some other parameters), then calculates |Hatta| ...

presque 12 ans il y a | 0

Réponse apportée
How can I find the location of the minimum and maximum
Others have explained how to get the index of the max or min, but I'm wondering if you actually want to know what the matrix is ...

presque 12 ans il y a | 0

Réponse apportée
curve fit with ode bad fit ??
Ah. This may have been partly my fault for mixing notation (lots of t and x and y all floating around). A good check is to see w...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Wrong coloring of legend in semilogx plot
I just tried an example in R2013b and it worked fine, but then I messed with it a bit and happened to get something very similar...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Dynamic Variables in Loops
Yes, this has been answered before, and the answer is: <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....

presque 12 ans il y a | 1

| A accepté

Réponse apportée
Masking and removing green pixels
At the risk of being accused of shameless self-promotion... <http://blogs.mathworks.com/steve/2014/08/12/it-aint-easy-seeing-gre...

presque 12 ans il y a | 0

Réponse apportée
Need help creating Easy function
<https://matlabacademy.mathworks.com/R2014b/ MATLAB Academy> can help you learn the basics of MATLAB. Or the "Getting Started" s...

presque 12 ans il y a | 0

Réponse apportée
how can i stop while loop immediately by a push button?
Once the first |imcrop| call is complete, the |imshow| command is executed, then |data.stop| is checked. That gives you the blin...

presque 12 ans il y a | 0

Réponse apportée
how can i stop while loop immediately by a push button?
When you say "i would like to stop it immediately by the button press", do you mean you'd like to interrupt the |imcrop| calls? ...

presque 12 ans il y a | 0

Réponse apportée
curve fit toolbox help system ODE and excel?
If I interpret your problem correctly, you have a system of ODEs with a parameter -- y' = f(t,y;c) -- and an Excel spreadsheet t...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
How can I perform a curve fit using polyfit on an exponential decay model?
The problem is that when X is big, 3*exp(-0.5.*(X)) is very small. Because of how floating-point arithmetic works, that's OK as ...

presque 12 ans il y a | 0

Réponse apportée
So apparently my textbook is out of date
What version of MATLAB are you running? (Enter |version| at the command prompt and it will tell you, if you're not sure.) The co...

presque 12 ans il y a | 0

Réponse apportée
How to move a (x,y) line plot to the z axis?
Something like this, perhaps? x = linspace(0,1)'; y1 = cos(2*pi*x); y2 = x.^2; y3 = y1.*y2; ribbon(x,[y1,y2...

presque 12 ans il y a | 0

Réponse apportée
Why this algorithm work only for 4 equations ?
Your |checkResult| function is returning something insufficiently close to zero. Given that it seems to be comparing the result ...

presque 12 ans il y a | 0

Réponse apportée
How to find the border points for a set of latitude and longitude coordinates
You don't actually need Mapping TB to find boundaries. You can do it with <http://www.mathworks.com/help/matlab/ref/convhull.htm...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Help me differentiate between two codes??
Ah, yes. This curious bit of syntax. What you ended up with was |sum(x)|! Why? Well, MATLAB evaluates the first condition |a <= ...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
how can i align two arrays according to their clock
If by "align the data" you mean you want both |data1| values and |data2| values at some common |time| values, then you will prob...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
I am plotting the logistic growth model using ode45,But I am confused because I am getting oscillation while I should get a constant line so do you think there is another routine could I use it or I need to change something to get the right plot??
The oscillation you're seeing is a standard numerical artifact that comes from using an explicit RK method. (Look at the scale o...

presque 12 ans il y a | 0

Réponse apportée
how to write a function in interval?
<https://matlabacademy.mathworks.com/R2014b/ MATLAB Academy> can help you learn the basics of MATLAB. Also the <http://www.mathw...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
why do I get "Matrix dimensions must agree" when using "<"
Given the form of the error message and your comment that it works for a given value of |i| (presumably at the command line), bu...

presque 12 ans il y a | 0

Réponse apportée
Iterating in a dataset encompassing a structure
If I understand the problem correctly, you're getting a dataset with variables |r0|, |r1|, |foo|, |potato|, etc, each one of whi...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Solve two second order differential equations where initial values are known in a vector!
Are your equations correct there? It seems like the RHS should involve sqrt(x'^2 + y'^2) not x''^2 and y''^2. I'm going to assum...

presque 12 ans il y a | 1

| A accepté

Réponse apportée
Finding indices when the curve stops decreasing
If you have Signal Processing TB, have a look at the <http://www.mathworks.com/help/signal/ref/findpeaks.html |findpeaks|> funct...

presque 12 ans il y a | 0

Charger plus