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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 1

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 2

| akzeptiert

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 1

| akzeptiert

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

etwa 3 Jahre vor | 2

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

etwa 3 Jahre vor | 0

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

etwa 3 Jahre vor | 1

Beantwortet
Finding four input combinations with the same output value by interpolation method, and find the one that minimizes the cost function.
Um, your technique will not really solve the problem. It approximates the solution. Regardless, you will now have difficulties e...

etwa 3 Jahre vor | 0

Beantwortet
Sum a matrix element using a window size of 4
Reshape the array, to be now of size 4x4x2 A = [-2 -2 -2 2 -2 2 -2 -2 -2 2 -2 -2 -2 -2 -2 2 -2 -2 2 -2 -2 2 2 2 ...

etwa 3 Jahre vor | 0

Mehr laden