Respondida
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' ;...

más de 13 años hace | 6

| aceptada

Respondida
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 ...

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 1

Respondida
Finding distance between point and edge of image mask
I think what you are looking for is the BWDIST function. help bwdist

más de 13 años hace | 1

| aceptada

Respondida
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...

más de 13 años hace | 0

Respondida
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....

más de 13 años hace | 0

Respondida
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 ...

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 1

| aceptada

Respondida
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...

más de 13 años hace | 1

Respondida
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. ...

más de 13 años hace | 3

| aceptada

Respondida
how plot results of a 3d matrix
These two commands shoulds be useful: help isosurface help slice

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 1

Respondida
Multivariate Regression Parameter Optimization
NLINFIT is good. NonLinearModel.fit is also good. But since your problem involves fitting a surface with only two indepe...

más de 13 años hace | 0

| aceptada

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

más de 13 años hace | 0

Respondida
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(:...

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 1

| aceptada

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

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 4

| aceptada

Respondida
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...

más de 13 años hace | 1

| aceptada

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

más de 13 años hace | 6

Respondida
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...

más de 13 años hace | 0

Respondida
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).

más de 13 años hace | 0

Respondida
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 ...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 1

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 1

Respondida
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')

casi 14 años hace | 1

| aceptada

Respondida
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...

casi 14 años hace | 1

| aceptada

Respondida
Eliminating Imaginary Numbers in an Array
Array = [-1/8 -1/16 0 1/16 1/8]; NewArray = nthroot(Array,3)

casi 14 años hace | 0

| aceptada

Cargar más