Réponse apportée
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; ...

plus de 2 ans il y a | 0

Réponse apportée
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 ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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;

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 1

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 1

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 2 ans il y a | 0

Réponse apportée
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); ...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 1

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 2

| A accepté

Réponse apportée
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)

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 2 ans il y a | 2

Réponse apportée
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...

plus de 2 ans il y a | 0

Réponse apportée
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...

plus de 2 ans il y a | 1

Réponse apportée
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...

plus de 2 ans il y a | 0

Charger plus