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

2 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; ...

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

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

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

2 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;

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

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

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

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

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

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

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

2 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

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

2 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); ...

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

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

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

2 years ago | 0

Answered
How can i generate an array of integers that is more dense around a certain value?
Honestly, you could probably do something using an optimization. But using an optimization technique to solve this seems to be t...

2 years ago | 0

Answered
Adding a binary decision variable in a linear optimization problem
linprog CANNOT be used with integer (binary) variables. However, there is intlinprog, which is explicitly designed to handle e...

2 years ago | 0

| accepted

Answered
I have calculated 4 standard deviation values for each row of a 4x3 matrix. How to convert these 4 values into a single standard deviation value for the whole matrix?
You should understand why it is not possible to compute the overall standard deviation, merely from the pieces. This is because ...

2 years ago | 0

Answered
How to calculate the date 0.25 years after the date of January 15, 2020
You did this: t = datetime(2020,1,1) But that is not January 15. It is January 1. Instead, had you done this: t = datetime(20...

2 years ago | 0

Answered
linear vs nonlinear regression model
@Mohammadreza As I said in my comment, there are two different kinds of linearity. Consider the model: y = a*exp(x) Is y line...

2 years ago | 2

| accepted

Answered
How to convert a string like "2.0:0.25:10.0" into a vector of floats?
A few ways I can think of immediately. S = "2.0:0.25:10.0" V = eval(S) V = str2num(S)

2 years ago | 1

| accepted

Answered
How do you go about guessing for fitting parameter initializations?
There is no magic way to guess parameter estimates for any nonlinear problem. Sorry, but true. And of course, if there was, then...

2 years ago | 0

Answered
I try to find a general vector base for all magic squares of dimension n . Why does this program work for n = 3, but not vor n > 3?
No resonse yet? Again, I don't see why you are using rref here. If all you want are basis vectors, then tools like null and orth...

2 years ago | 1

| accepted

Answered
will there be support for version 2 of the twitter api?
In general, we cannot tell you IF there will be support for anything. The MathWorks does not release information about their pla...

2 years ago | 2

Answered
how can I take elements of an array as input to a function in a set of 10 elements each?
A terribly confusing question. (Even if I ignore the fact that your subject says 10 elements, but the question text says 26 elem...

2 years ago | 0

Answered
How can I create a spline with conditions on the middle?
Just use my SLM rtoolbox. It can impose literally any condition on a spline that you want. And it can impose conditions on the s...

2 years ago | 1

Load more