Réponse apportée
what to do in this case?
You cannot set a variable to have a value inside another statement. For example, this line of code would not be valid in MATLAB...

plus de 3 ans il y a | 0

Réponse apportée
How do I pass a function a mathematical function of the for x.^2
Time to learn about function handles! A function handle alows you to pass one function to another. f = @(x) x.^2; What is f? ...

plus de 3 ans il y a | 0

Réponse apportée
Need help with Exponential Curve fitting
First, plot EVERYTHING. Then if you don't understand what you see, plot something more, or plot it in a different way. load xda...

plus de 3 ans il y a | 0

Réponse apportée
ushuffle the matrix elements
a = magic(3) reshape(a(randperm(numel(a))),size(a))

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
I want to get the covariance matrix from the Hessian matrix, but fminunc returns non-positive definite Hessian.
Fminunc returns its current estimate of the Hessian, which may not be correct at the optimum, because it will be continuously up...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
how to check whether a vector in a subspace or not?
You want to test if a new vector (not two at a time!) lies in the column space of a matrix V. Here, V is a 6x7 matrix. V=[2 3 1...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
how to code the cirle in the function graph
If you have a point moving along the curve, then you can know the x value of that point. As well, compute y, at that x value. Y...

plus de 3 ans il y a | 0

Réponse apportée
Is there a function that does the same thing as the numel function?
There are multiple ways you COULD achieve the same result as numel. Not all of them are good. For example, length ALMOST does th...

plus de 3 ans il y a | 1

Réponse apportée
how to find a plane perpendicular to a line?
What you need to understand is a plane is defined by TWO things. The normal vector to the plane, AND a point on the plane. That ...

plus de 3 ans il y a | 1

Réponse apportée
The easiest way to learn matlab?
The easiest way? Why must there always be an easy way to truly learn something well, developing some real expertise at it? Have ...

plus de 3 ans il y a | 0

Réponse apportée
How Can I Plot Multiple Points Without Mathlab Joining Them?
Plot is a simple tool. If you give it no direction at all about the line or markers, then it connects the points with a line, an...

plus de 3 ans il y a | 0

Réponse apportée
Vector operation giving complex numbers
You don't necessarily fix it, except by understanding the mathematics of what you are doing. blog_mean = 0.5000; blog_var = 0....

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Fitting a data with the best fit
As others have said, there is no magical way to know what is the "best" fitting model for such a problem. If you lack any model ...

plus de 3 ans il y a | 0

Réponse apportée
How can I find X for given Y value in a fitted curve. I have a non- linear equation of 6th order.
There are more digits in those numbers as estimated. Just using numbers accurate to 4 digits is far too low for a 6th degree pol...

plus de 3 ans il y a | 0

Réponse apportée
How to increase precision in this case?
Take it from here: vpa(exp(sym(1)),500) Now just process the digits. Or I think I have something on the order of a million di...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Plotting a 1D function by hovering on a 2D plot
We all want things we cannot easily have. For example, I would very much want to see world peace. Will I ever see it? Probably n...

plus de 3 ans il y a | 0

Réponse apportée
how to debug the non-working of real() function?
When you get an error, don't just tell us that something is not working. Tell us the error message. The COMPLETE, error message,...

plus de 3 ans il y a | 0

Réponse apportée
Symbolic equation simplification output, such as x/y from two equations
If you don't know what umax is, where would it go? What do you hope to see here as a result? You are computing the ratio, u0/uma...

plus de 3 ans il y a | 0

Réponse apportée
How to run a while loop 1000 times
You use a for loop when you know how many iterations you will need. So I'm not sure why you want to use a while loop for a speci...

plus de 3 ans il y a | 0

Réponse apportée
How to create a 2D reverse matrix
Since you are willing to use tools like fliplr (as opposed to flip. Anyway, fliplr and flipud are more descriptive, so I kind o...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Convex set: Finding the A and b matrices from Ax=b when the points of the convex set is known.
@Matt J has a set of tools for working with such objects. https://www.mathworks.com/matlabcentral/fileexchange/30892-analyze-n-...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Calculating exponentials using only addition?
Why in the name of the gods of computing would you possibly want to do this? Seriously? Not homework? A simple waste of CPU time...

plus de 3 ans il y a | 0

Réponse apportée
Why does the SUBS command is not working with numbers?
Odds are, you don't understand floating point numbers. When you see this value in MATLAB: 0.8909, generally that is not the true...

plus de 3 ans il y a | 0

Réponse apportée
I am trying to run a simulation 1000 times and generate a matrix 600x1000. My simulation creates a 1x600 vector
Easy. Create a matrix, of size 1000x600. results = zeros(1000,600); Now, in your loop, assign the vector to one column of that...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Problem is unbounded with linprong
Unbounded means what it sounds like. We can move in SOME direction, making the objective as small as we wish. I.e., as close to ...

plus de 3 ans il y a | 1

Réponse apportée
fmincon optimizes a non-differentiable function, How?
No. It does NOT throw an error, though maybe sometimes a warning. It may often even survive as it did here. fmincon does not aut...

plus de 3 ans il y a | 2

Réponse apportée
Solving an Equation in Matlab
Sounds like you got an answer that worked, but let me expand. You have a function: f = @(t)16.68*t - (16.68*(1-(exp(-0.21*t)))/...

plus de 3 ans il y a | 0

Réponse apportée
Not sure why I keep getting this error message?
Parens need to be balanced. This is true in pretty much any language I can think of, but I am sure there are exceptions. Square ...

plus de 3 ans il y a | 0

Réponse apportée
Determine in an interpolation the contribution of each node nearby
The most significant nodes? The nearest neighbors to a given point. Beyond that, the significance will die off, probably exponen...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Efficient multiplication by large structured matrix of ones and zeros
Are there more efficient ways to do this? Well, perhaps, arguably so. Why you want to do it, is I supose your problem. THINK ab...

plus de 3 ans il y a | 1

Charger plus