Réponse apportée
How can I sort a string both alphabetically and numerically?
Very ugly, but works: UnsortedText = {'BBB 1'; 'AAA 10'; 'AAA 9'; 'AAA 1'; 'BBB 2'; 'BBB 19'; 'BBB 9'; 'CCC 0'; 'CCC 9' ;...

presque 14 ans il y a | 6

| A accepté

Réponse apportée
solid contour lines for some specific values of a contourf plot
The userdata property of each patch is set to the level's value. You can use this to find the relevant patch, and make its line ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
can you plot a image? (line by line or pixel by pixel)
One idea would be to use the AlphaData property. This sets the transparency of each pixel: A = im2bw(rand(10,7)); M = ze...

presque 14 ans il y a | 1

Réponse apportée
Finding distance between point and edge of image mask
I think what you are looking for is the BWDIST function. help bwdist

presque 14 ans il y a | 1

| A accepté

Réponse apportée
Need help - How to generate predefined subsets?
Another idea: [C1,C2,C3,C4] = ndgrid(1:5); allCombinations = [v(C1,1) v(C2,2) v(C3,3) v(C4,4)] Or a more flexible way...

presque 14 ans il y a | 0

Réponse apportée
Vectorization in an array of structures?
Not sure there's an easy way to do that. There is this, but I don't see much benefit over using a loop. N = num2cell([S....

presque 14 ans il y a | 0

Réponse apportée
Extracting points from an interpolated surface (Lowess fit)
You can directly call your FIT object with the points you want to evaluate. Like this: fitresult(3,4) fitresult([1 2 ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Analytically and numerically computed arc length
I'm not sure how you are analytically calculating path length. It seems from your expression that you just integrated r(t) strai...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
Imposing additional constraints while using 'lsqnonneg'
I think this should work. If you are minimizing ||Cx - d|| First, remove the first and last columns of C, and call LSQNON...

presque 14 ans il y a | 1

Réponse apportée
Numerical approximation of projectile motion with air resistance
You are forgetting to update v inside your loop. v = sqrt(vx^2 + vy^2); Right now it is sitting at v = 50 the whole time. ...

presque 14 ans il y a | 3

| A accepté

Réponse apportée
how plot results of a 3d matrix
These two commands shoulds be useful: help isosurface help slice

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Simple Solve command not working.
When you use solve with a string input, it interprets the "E" as exp(1). Try this: solve('x = E', 'x') If you really wa...

presque 14 ans il y a | 1

Réponse apportée
Multivariate Regression Parameter Optimization
NLINFIT is good. NonLinearModel.fit is also good. But since your problem involves fitting a surface with only two indepe...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Correcting a Non-Uniform Background
One example that uses morphological operations is here: <http://www.mathworks.com/products/image/examples.html?file=/products...

presque 14 ans il y a | 0

Réponse apportée
Deleting duplicate images in 3-dimesional matrix
%First, I'll make some sample data with some duplicates: A = rand(200,200,50); A(:,:,16) = A(:,:,41); A(:,:,32) = A(:...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
remove sidewalls from surface plots
There are several ways, for example by replacing points with NaN, but they often give mixed results as far as appearance. The co...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
Numerical Solution
Ok, your "q" will have an imaginary component, so you cannot use fzero directly. You can, however, solve it using fsolve, where ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How to convert easily *.mat files to *.m files
Do you happen to have Simulink? There is the "Simulink.savevars" command that will write variables into a readable MATLAB script...

presque 14 ans il y a | 4

| A accepté

Réponse apportée
Programmatic polynomial fitting with mutliple measurements and known parameters
If I understand this correctly, you want model something as y = f(x1,x2,x3,x4), where f is a polynomial of some sort. You hav...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
How to keep aspect ratio fixed, when rotating 3D objects in GUI?
Maybe this will do what you are trying to accomplish? axis vis3d

presque 14 ans il y a | 6

Réponse apportée
Find Min& Max Togather
The Neural Network Toolbox actually already has a function to do this called MINMAX. It calculates the min and max of each row o...

presque 14 ans il y a | 0

Réponse apportée
compute determinant using Cholesky decomposition
You could try prod(diag(chol(A)))^2 But I have no idea if/when this would be faster than simply det(A).

presque 14 ans il y a | 0

Réponse apportée
System of three differential equations
So you have experimental data (S(t),I(t), and R(t)), and you are trying to find the parameters (a and r) that will make the ODE ...

presque 14 ans il y a | 0

Réponse apportée
Graph a plane spanned by 2 vectors
The way you are calliing EZMESH inteprets the input as z = f(x,y). So you can't express things like the x=0 plane. But what y...

presque 14 ans il y a | 1

Réponse apportée
Recommendations for evaluating a 6-D Integral
Assuming that "gamma" and "psi" are the same thing, are you sure your integrand is correct? Look at when theta = psi = pi/2...

presque 14 ans il y a | 0

Réponse apportée
Recommendations for evaluating a 6-D Integral
Here's a simple idea. If your integrand is more or less smooth. Evaluate it on a number of different coarse grids, and then extr...

presque 14 ans il y a | 0

Réponse apportée
Curve Fitting
As proecsm points out, your data needs to be made into columns. Like this: x = 1:1000; %Row vector y = sin(0.01*x) + cos...

presque 14 ans il y a | 1

Réponse apportée
dsolve problem
One way would be to convert f to a string: syms x y f f=x y=dsolve(['D2x=-' char(f)],'x(0)=1','Dx(0)=0')

presque 14 ans il y a | 1

| A accepté

Réponse apportée
Trouble Evaluating an Integral
If you are using R2012a, you can try using INTEGRAL3 In any case, since you are integrating in spherical coordinates, you nee...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
Eliminating Imaginary Numbers in an Array
Array = [-1/8 -1/16 0 1/16 1/8]; NewArray = nthroot(Array,3)

presque 14 ans il y a | 0

| A accepté

Charger plus