Answered
How to use the weighted least square method for accurate calculation of parameters?
How many times will you ask this question? Please stop reposting it. load X_actual load A load B whos A = A_primary_A; B =...

3 years ago | 0

Answered
Change condition 'A=253' into 'A(A=253)=0' with multiple values (for example: A=70 and A=253)
You CAN use an and operator in there. That is fine if you have 2 or maybe even 3 cases. But one day when you have 27 possibiliti...

3 years ago | 0

| accepted

Answered
How to find the closest value pair in a matrix?
Assuming that you have a much larger problem, and that you have multiple points, to test, knnsearch is the correct tool. A = [0...

3 years ago | 1

| accepted

Answered
get x knowing f(x)
Is there ALWAYS a simple solution? NO! SOMETIMES, there is. But for almost all problems you might write down, there is no algebr...

3 years ago | 0

Answered
Raising a negative to a non-integer exponential
What do you expect? Do you understand there is no real answer to that fractional power? For example, what is (-2)^0.5 Yes, a...

3 years ago | 0

Answered
How do I choose the initial values for non-linear curve/function fitting?
Yes, there is an easy way to do it automatically, but its a SECRET! They would have built it into the code, but it is such a big...

3 years ago | 1

Answered
What is the best error metric for complex numbers in matlab?
First, why do you think this is inadequate? What don't you like about it? Does it satisfy some basic requirements of a simple n...

3 years ago | 0

Answered
How to run the same script but for different datafiles
Don't write scripts. Learn to write FUNCTIONS instead. Your function will take, as input, the NAME of the data file it wants t...

3 years ago | 1

Answered
How to use fminbnd but with multiple variables
You CANNOT use fminbnd with vectors. Period. A vector of numbers is not a function. Often people think of a vector as a function...

3 years ago | 1

| accepted

Answered
Help creating an array with uniformly distributed random numbers (row-wise) comprised between 0 and 1, with each column having a sum of 1
This is a mistake I see made so frequently, that is, a misunderstanding of what it means for a sample to be uniformly distribute...

3 years ago | 1

Answered
Writing a Science Fiction Novel and want to ensure my math and science within the novel remain accurate, respectful, and authentic.
As a response to the question asked, I think possibly you are going down the wrong path, because first, I see no reason why you ...

3 years ago | 1

| accepted

Answered
Can I use the Matlab function called "dice" to compare two histograms (or discrete probability distributions)?
No. Use of the dice function to compare hisograms would be a complete misuse of the tool. Instead, you might better use tools fr...

3 years ago | 1

| accepted

Answered
Iterative Process to find a variable in which two equations are equal and opposite
h is the unknown. The problem becomes simple, but even so, there are some serious issues you need to understand. Eo=1; Uo=1; ...

3 years ago | 0

Answered
Add value x to negaive numbers and subtract value x from positiv numbers in same double
Trivial. Though you do not say what happens to zero. V = [5 4 3 2 1 -1 -2 -3 -4 -5]; x = 0.5; V - x*sign(V) As I said, It ...

3 years ago | 0

| accepted

Answered
source code of multistart in global optimization toolbox
No problem. Just apply for a job at The MathWorks. Then get a job (there, and probably in the correct part of their organization...

3 years ago | 0

Answered
How can I plot the displacement of a pipe so that the disp=0 starts from the perimeter of a pipe. I have a picture
You apparently have a displacement, so a radial change in the pipe, as a function of angle. That is, if the displacement is posi...

3 years ago | 0

Answered
How do I fix negative values in a function to zero ?
Have something like this be the last thing you do in the function. x = max(x,0); Or, x(x<0) = 0;

3 years ago | 0

| accepted

Answered
Is it possible to do a collision analysis of a mass-spring system in Matlab?
Is it possible? Of course. First, learn MATLAB. Start with the Onramp tutorials. At that point, the path you take would depend...

3 years ago | 1

Answered
why do we initialize any vector or matrices with zero.
You can preallocate with ANY number. Feel free to preallocate with pi, using say, repmat. Personally, I like to preallocate with...

3 years ago | 0

Answered
How can I calculate the area of ellipses inside my path plot
There is no exact analytical expression for the area of an ellipse. Yes, I know that always seemed a bit surprising even to me a...

3 years ago | 0

| accepted

Answered
Variables are stored but not shown is the workspace?
clear x = 1; ans = x+1 whos As you can see, the variable ans does appear. HOWEVER, you should never be using ans as a variab...

3 years ago | 1

Answered
How we can find equation of contour line?
It would be rarely true that you could find an "equation" for any given contour line, at least on any problem that involved real...

3 years ago | 0

Answered
how to increase the weight of a certain point when using smoothing splines?
Just read the help for csaps. Here is a link for the doc: csaps In there, I find this line: pp = csaps(x,y,p,[],w) also...

3 years ago | 1

| accepted

Answered
Not enough input arguments in trapz
I would strongly suggest you should not name your own functions the same as existing code. If you do, then this is exactly the t...

3 years ago | 0

| accepted

Answered
How to bring the second member of an equation to the first and set the equation equal to zero?
syms nx5_1_5 nx5_4_5 eq = nx5_1_5==nx5_4_5 And now? eq - nx5_4_5

3 years ago | 0

| accepted

Answered
How to get the available solution of the singular matrix equations?
It is generally a really bad idea to hard code numbers into an m-file as you did. The problem is, those numbers are not exactly ...

3 years ago | 0

Answered
There is no lsqminnorm function in matlab 2014-b, but what if this function is needed to solve the problem
There are several tools around that serve the same purpose, and have been here since god knows when. A = rand(10,2)*rand(2,3); ...

3 years ago | 0

Answered
I have a matrix given below. I want to count the number of sets of consecutive non zero values along each row. Detailed description and desired result given below
These problems are always simpler, IF you reduce it to simpler sub-tasks. And, I'm sure there are simpler ways to solve this pro...

3 years ago | 0

| accepted

Answered
how can I change a sequence so that the values of the sequence are zero if the the result division by 2 is not an integer in MATLAB?
Learn to use MATLAB. As a good start, that means you need to do the Onramp tutorial. And since this is very likely homework, or...

3 years ago | 1

Answered
How to integrated a function when I know its value at specific points
Are these scattered points? If so, then what do you mean to integrate over a rather non-convex domain? For example, I'll pick 10...

3 years ago | 0

Load more