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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

| akzeptiert

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

fast 4 Jahre vor | 1

| akzeptiert

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

| akzeptiert

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

fast 4 Jahre vor | 1

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

fast 4 Jahre vor | 2

Beantwortet
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)))/...

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

| akzeptiert

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

fast 4 Jahre vor | 1

Beantwortet
Generate normal distribution with LGC random issue
After looking at your code in my other answer, the problem clearly reduces to your RNG. Is that even a valid linear congruential...

fast 4 Jahre vor | 0

Beantwortet
Generate normal distribution with LGC random issue
I might check that you REALLY are using the same expressions for both of the transformations to Normal. Have you done so? (STRON...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Does anyone have the source code of the regression decision tree in MATLAB?
You already have the source code. For example, just do this in MATLAB: type fitrtree The code is written in MATLAB itself, so ...

fast 4 Jahre vor | 0

Beantwortet
How to find mutually orthogonal vectors with unknown?
In theory, Gram-Schmidt would be sufficient. https://en.wikipedia.org/wiki/Gram–Schmidt_process In practice, if the number of ...

fast 4 Jahre vor | 0

Beantwortet
Random numbers generation problem
Just compute the set of all numbers in the interval you care about that are NOT divisible by those small primes. Technically, th...

fast 4 Jahre vor | 0

Beantwortet
Match two columns with names/strings that are not 100% identical
Searching for degree of similarity is not a completely trivial task. In a sense, you want to describe the distance between two "...

fast 4 Jahre vor | 0

Beantwortet
How can I calculate 5 lions in a row?
I'm so used to coins having heads or tails though. ;-) I guess I can deal with lions. Anyway, your code gets at the question at...

fast 4 Jahre vor | 0

Beantwortet
fminsearch for a function f(x,y) = x^4 -3xy+2y^2
This MUST be a homework question. But by now, you have multiple answers, that I think don't explain in any depth what you asked....

fast 4 Jahre vor | 0

Beantwortet
Tic toc without output
First, using tic and toc are bad ways to compute the time to do something. Why? They compute only ellapsed time, and even then, ...

fast 4 Jahre vor | 0

Beantwortet
How can I nest a function in a function?
See that I wrote hilbert differently. Feel free to use doubly nested loops there. But why? As well, NEVER name a function the s...

fast 4 Jahre vor | 0

Beantwortet
I want to find 4 consecutive number which is present in array.
Easy. What property does a sequence of 4 consecutive numbers have? I suppose there may be many such properties, for example, the...

fast 4 Jahre vor | 1

Beantwortet
How to I plot a graph that reflects the percentage of change of an equation when an varable changes
Your question is not one with an always easy answer. Effectively, you are asking for a sensitivity analysis. The basic answer wo...

fast 4 Jahre vor | 0

Beantwortet
how to split a string (char value) with zero in front of it but showing the value in the matrix?
MATLAB does NOT allow you to store or represent an integer as the number 0100. If you try, you will get 100. The leading zero go...

fast 4 Jahre vor | 0

Beantwortet
different result of PCA function and my PCA
Congratulations! You are the 1 millionth person to have this happen, and then be confused. Your reward is a free trip to Newark,...

fast 4 Jahre vor | 0

Beantwortet
Using GA to optimize a fuction of a fuction that is dependent on the
I don't see the problem. If you know x1,x2,x3, then you can compute b. You tell us that. Yes, it is a nonlinear equation. So wh...

fast 4 Jahre vor | 0

Beantwortet
Why do I get unrecognized function for a built in function?
which psdg -all As you can see, psdg does not exist as a MATLAB function, in any toolbox we can search, and they are all pretty...

fast 4 Jahre vor | 0

Beantwortet
i want to solve a 297 linear equations with 298 unknown variables
There are some serious problems in this. I won't even get into the literal impossibility of what you have done, to write down an...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Slope of line intersecting with y axis
What has this to do with MATLAB? The axis has NOTHING to do with the slope!!!! The slope in both cases is (y2 - y1)/(x2 - x1)....

fast 4 Jahre vor | 0

Mehr laden