Réponse apportée

Create a matrix and a map of Hydrologic Soil Group values using integer or character values

MATLAB does indeed allow you to produce a character matrix, with those characters. However, I assume you have scattered data, wi...

Create a matrix and a map of Hydrologic Soil Group values using integer or character values

MATLAB does indeed allow you to produce a character matrix, with those characters. However, I assume you have scattered data, wi...

24 jours il y a | 0

Réponse apportée

Determine row vector out of matrix with most evenly spaced and distributed values

Simple. Sort of. But you need to define what equal spacing means to you, and how you will measure the deviation from equal spaci...

Determine row vector out of matrix with most evenly spaced and distributed values

Simple. Sort of. But you need to define what equal spacing means to you, and how you will measure the deviation from equal spaci...

24 jours il y a | 0

| A accepté

Réponse apportée

Are polyshape vertices preserved reliably without floating point errors?

Um, probably, yes. But potentially no. Yes, because on most operations, you will just be indexing into the original set of vert...

Are polyshape vertices preserved reliably without floating point errors?

Um, probably, yes. But potentially no. Yes, because on most operations, you will just be indexing into the original set of vert...

24 jours il y a | 1

Réponse apportée

Integrate function by for loop

As always look carefully at your code. Learn to use the debugger. It would tell you the problem, and in which line there was a p...

Integrate function by for loop

As always look carefully at your code. Learn to use the debugger. It would tell you the problem, and in which line there was a p...

25 jours il y a | 0

Réponse apportée

matrix, where each element is a column vector

You don't need a cell array at all! Just use a 3-d array. A = randn(11,7,1001); Now to compute the max in each vector, just u...

matrix, where each element is a column vector

You don't need a cell array at all! Just use a 3-d array. A = randn(11,7,1001); Now to compute the max in each vector, just u...

25 jours il y a | 1

Réponse apportée

inverser la matrice tri-diagonale

As much as I hate the suggestion, you could trivially use inv. ;-) Better would be to use sparse matrices. That is, learn to us...

inverser la matrice tri-diagonale

As much as I hate the suggestion, you could trivially use inv. ;-) Better would be to use sparse matrices. That is, learn to us...

25 jours il y a | 0

Réponse apportée

Solve long matrices equation

This is a classic algebraic Ricatti equation. https://en.wikipedia.org/wiki/Algebraic_Riccati_equation How do you solve it in ...

Solve long matrices equation

This is a classic algebraic Ricatti equation. https://en.wikipedia.org/wiki/Algebraic_Riccati_equation How do you solve it in ...

25 jours il y a | 0

Réponse apportée

fminsearch doesn't converge to the right value

These things are always easier than you think. Well, except when they are just as hard as you think. ;-) First, I'll create x a...

fminsearch doesn't converge to the right value

These things are always easier than you think. Well, except when they are just as hard as you think. ;-) First, I'll create x a...

26 jours il y a | 1

| A accepté

Réponse apportée

How to use a variable from script in a function that is in another script

Just create your function like this. In my example, k3 and m3 will be assigned, so that you can see how it works. k3 = 3; m3 =...

How to use a variable from script in a function that is in another script

Just create your function like this. In my example, k3 and m3 will be assigned, so that you can see how it works. k3 = 3; m3 =...

27 jours il y a | 0

Réponse apportée

How do I lower an image quality?

There are other ways to lower image quality. Several ideas have already been mentioned. Resize the image, then expand it back u...

How do I lower an image quality?

There are other ways to lower image quality. Several ideas have already been mentioned. Resize the image, then expand it back u...

27 jours il y a | 1

Réponse apportée

I am struggling trying to figure out this code I have it completed but I keep getting errors, can you help?

I need to laugh (sorry, but it is true) every time I see someone claim they have completely written a long piece of code, and cl...

I am struggling trying to figure out this code I have it completed but I keep getting errors, can you help?

I need to laugh (sorry, but it is true) every time I see someone claim they have completely written a long piece of code, and cl...

28 jours il y a | 0

Réponse apportée

Finding intermediate points between two cartesian coordinates in 3D

You cannot find ALL the points between any pair, in any number of dimensions. At best, you can describe the set of all such poin...

Finding intermediate points between two cartesian coordinates in 3D

You cannot find ALL the points between any pair, in any number of dimensions. At best, you can describe the set of all such poin...

30 jours il y a | 1

| A accepté

Réponse apportée

How to find the point that resides on a contour that is closest to a known point?

You can't. That is, you cannot use calculus to do this, at least not as it is, not directly. That contour is a set of piecewise ...

How to find the point that resides on a contour that is closest to a known point?

You can't. That is, you cannot use calculus to do this, at least not as it is, not directly. That contour is a set of piecewise ...

environ un mois il y a | 0

| A accepté

Réponse apportée

i want to solve 3 non linear equations in matlab

You can want anything you want. I, for example, want to see peace in the world, with everyone treating everyone else as an equal...

i want to solve 3 non linear equations in matlab

You can want anything you want. I, for example, want to see peace in the world, with everyone treating everyone else as an equal...

environ un mois il y a | 0

Réponse apportée

I need the installer for Matlab R2010b SP1

We cannot help you. Answers does not have software, cannot supply it. The only people who would be able to help you are at MathW...

I need the installer for Matlab R2010b SP1

We cannot help you. Answers does not have software, cannot supply it. The only people who would be able to help you are at MathW...

environ un mois il y a | 0

Réponse apportée

problem with genetic algorithm

Clearly, your constraint function is not evaluating as a real number. It is likely complex, based on the error message. (Though ...

problem with genetic algorithm

Clearly, your constraint function is not evaluating as a real number. It is likely complex, based on the error message. (Though ...

environ un mois il y a | 0

Réponse apportée

fsolve stopped because the last step was ineffective

This is a common mistake I see being made. You have a problem that has symmetries in it. x(1), x(2), x(3) all play similar parts...

fsolve stopped because the last step was ineffective

This is a common mistake I see being made. You have a problem that has symmetries in it. x(1), x(2), x(3) all play similar parts...

environ un mois il y a | 1

| A accepté

Réponse apportée

Accessing a vector form a matrix

As an example, given vectors x1,x2,x3. I'll make some up. x1 = randi(10,1,5) x2 = randi(10,1,5) x3 = randi(10,1,5) Combine t...

Accessing a vector form a matrix

As an example, given vectors x1,x2,x3. I'll make some up. x1 = randi(10,1,5) x2 = randi(10,1,5) x3 = randi(10,1,5) Combine t...

environ un mois il y a | 0

Réponse apportée

Find the variable inside the LCM argument

You have the expression: B=lcm(nrt,Nr*Nc) where the variables B and nrt are known. The unknown variable is the product nr*...

Find the variable inside the LCM argument

You have the expression: B=lcm(nrt,Nr*Nc) where the variables B and nrt are known. The unknown variable is the product nr*...

environ un mois il y a | 1

Réponse apportée

volume calculation from the DelaunayTri(x,y,z) function

Its not THAT hard. You compute the volume of each simplex in the tessellation. Sum the absolute values up. (Since those simplexe...

volume calculation from the DelaunayTri(x,y,z) function

Its not THAT hard. You compute the volume of each simplex in the tessellation. Sum the absolute values up. (Since those simplexe...

environ un mois il y a | 1

| A accepté

Réponse apportée

is there any reason for this?

Is there any reason? Well, does there absolutely need to be a "reason"? These are a set of choices, made over a period of multip...

is there any reason for this?

Is there any reason? Well, does there absolutely need to be a "reason"? These are a set of choices, made over a period of multip...

environ un mois il y a | 1

| A accepté

Réponse apportée

find a zero of a two-variable function

A two variable function is a surface. (@Sam Chak said this, but did not take the idea to the point of completion.) But if a sur...

find a zero of a two-variable function

A two variable function is a surface. (@Sam Chak said this, but did not take the idea to the point of completion.) But if a sur...

environ un mois il y a | 0

Réponse apportée

Extracting values from optimization variable and setting constraints

Are you saying you want to constraint the sum of absolute values? That is, in context of a LINEAR programming problem? This is ...

Extracting values from optimization variable and setting constraints

Are you saying you want to constraint the sum of absolute values? That is, in context of a LINEAR programming problem? This is ...

environ un mois il y a | 0

| A accepté

Réponse apportée

I am trying to do multi step math and keep returning the wrong answer

Of course it is wrong. Why did you write 72/13? Why 25/3? I think you don't understand that 8(1/3) is NOT the same thing as ...

I am trying to do multi step math and keep returning the wrong answer

Of course it is wrong. Why did you write 72/13? Why 25/3? I think you don't understand that 8(1/3) is NOT the same thing as ...

environ un mois il y a | 0

| A accepté

Réponse apportée

Calling GA() with 10 generations 10x vs GA() with 100 generations.

Is there any difference? Of course! Make it more extreme yet. Suppose you were to stop after 1 iteration. ONLY 1. But do it 100 ...

Calling GA() with 10 generations 10x vs GA() with 100 generations.

Is there any difference? Of course! Make it more extreme yet. Suppose you were to stop after 1 iteration. ONLY 1. But do it 100 ...

environ un mois il y a | 0

Réponse apportée

Check the result if it is divisible or not

Do you understand that you are using DOUBLE precision arithmetic to compute that mod? Do you understand that 7^2026 is a number ...

Check the result if it is divisible or not

Do you understand that you are using DOUBLE precision arithmetic to compute that mod? Do you understand that 7^2026 is a number ...

environ un mois il y a | 1

| A accepté

Réponse apportée

Treating ties in a Gaussian Elimination process

Um, max does exactly that. Where is there a problem? x = [1 2 3 4 3 4 1]; [xmax,ind] = max(x)

Treating ties in a Gaussian Elimination process

Um, max does exactly that. Where is there a problem? x = [1 2 3 4 3 4 1]; [xmax,ind] = max(x)

environ un mois il y a | 0

Réponse apportée

Matlab editor settings: notify undefined variables

For one example of a scenario where a variable appears to be undefined, yet is properly used, consider the case of a nested func...

Matlab editor settings: notify undefined variables

For one example of a scenario where a variable appears to be undefined, yet is properly used, consider the case of a nested func...

environ un mois il y a | 0

Réponse apportée

Trying to determine roots of this polynomial (Det)

k = [1750 -750 0; -750 1250 -500; 0 -500 500]; m = [75 0 0; 0 75 0; 0 0 50]; D=inv(m)*k; syms x I = [x,0,0;0,x,0;0,0,x]; La...

Trying to determine roots of this polynomial (Det)

k = [1750 -750 0; -750 1250 -500; 0 -500 500]; m = [75 0 0; 0 75 0; 0 0 50]; D=inv(m)*k; syms x I = [x,0,0;0,x,0;0,0,x]; La...

environ un mois il y a | 1

Réponse apportée

Area using trapezoidal rule

Um, this is WRONG. Basic integral calculus does NOT say a result should never be negative. You are possibly misunderstanding wha...

Area using trapezoidal rule

Um, this is WRONG. Basic integral calculus does NOT say a result should never be negative. You are possibly misunderstanding wha...

environ 2 mois il y a | 1

| A accepté