Answered
What is the reason for using the expression "if true" ?
If you clck on the "{} Code" button, but with no code pasted in and selected, the website inserts an if true block. Thus... ...

9 years ago | 2

Answered
Optimizing 10 unknown parameters for solutions of system of 3 ODEs
You have 8 pieces of information, for each of 3 equations. You have 10 parameters. So even if we view this as 24 data points, tr...

9 years ago | 0

Answered
The integral result comes as a function rather than a value.
Is it true that all equations have an analytical solution? All integrals have some nice, closed form solution? Of course not. Is...

9 years ago | 0

Answered
Fourier series expansion using the Curve Fitting Tool
Almost always when someone complains of exactly this problem, it is because they did not in fact use the correct coefficients. I...

9 years ago | 1

| accepted

Answered
Please help me out with this, i want to plot log on x axis and log on y axis with the below values of x and you . please is my written program correct? Thx
Just use loglog(x,y) Plot is not involved. I think it is time for you to actually read the documentation for MATLAB T...

9 years ago | 0

Answered
I need to create a rectangle that is 2 units long and 10 units high and then i need to plot it
Is there a good reason why you are not using plot properly, as the help describes? Trying to make utilities work in ways they ar...

9 years ago | 0

Answered
Fit Reference plot to data
This seems to be a fairly classic calibration problem. Are the two curves sampled at the same values for EV? If so, then this is...

9 years ago | 0

Answered
Sum the numbers of a range 1 + 1/2 + 1/3 + ... + 1/n with a while-loop.
DON'T USE SUM AS A VARIABLE NAME!!! If you do that, you will then be unable to use the useful function named sum. The result ...

9 years ago | 0

Answered
why i am not getting the exact answer when i use lu built in function?
An LU factorization is not unique. ONE such solution is the one that you came up with, probably due to an un-pivoted LU. The 25 ...

9 years ago | 1

Answered
Could the following question be answered regarding a previous sinusoidal curve fitting post?
An upside down sinusoid? You are estimating b(1). That just corresponds to negating the value of b(1). But since you are estimat...

9 years ago | 0

Answered
How to use polyfitn function in MATLAB R2017b version?
polyfitn is not part of MATLAB. It can be found on the file exchange for free download. Did you recently update MATLAB? If yo...

9 years ago | 0

Answered
How to modify vector?
What vector? Is x a vector? Why do you possibly need a while loop? y = y + round(rand(size(y))) - 0.5; So round(rand(siz...

9 years ago | 0

| accepted

Answered
Gaussian Quadrature ( Legendre Polynomials )
NO NO NO. You say that you don't want to use syms here. So why in the name of god and little green apples are you doing things l...

9 years ago | 3

| accepted

Answered
How to force my robust regression to pass through y=1?
Use robustfit with no constant term. But subtract 1 from y. That forces the fit to pass through y==1, at x==0. b(1) = 1;...

9 years ago | 2

| accepted

Answered
What is the right way to treate "Optimization terminated: no feasible point found." ???
A feasible solution is some point, ANY point, that satisfies all of the constraints. There is no assurance that a feasible point...

9 years ago | 0

| accepted

Answered
griddata interpolation just within a certain distance
You have large holes in your data. But your data is not well defined by the convex hull of your data. So you have this long conc...

9 years ago | 2

Answered
How can I solve the problem with linprog function described in post?
You cannot use linprog. Not to solve a problem with integer variables. You will need intlinprog to solve that class of problem. ...

9 years ago | 0

| accepted

Answered
How to iterate fast through thousands of combinations?
Nope. Sorry, but there is no magic here. You have an optimization of a "function", an objective that essentially lives only o...

9 years ago | 1

| accepted

Answered
Equivalent to "GOTO" to jump to different mfiles?
NO. Why would you possibly need it? Learn to use MATLAB, instead of trying to use some other language inside MATLAB. There are m...

9 years ago | 0

Answered
Sigma notation - difference of individual vector values, for loop or symsum?
I think you really need to read the basic tutorials for MATLAB, because this is about as basic as you can get. If you subtrac...

9 years ago | 1

| accepted

Answered
Are the contraints correctly used?
I don't even need to look carefully at this problem, and I can predict that it is unbounded. Exactly where did you tell solve...

9 years ago | 1

| accepted

Answered
how to find area under the curve with cumsum and cumtrapz?
You should understand that a simple sum is not an integral. To approximate an integral using a Riemann sum, you also need to mul...

9 years ago | 0

| accepted

Answered
Help me for solving this integral
Where did you define u? At no point in the script you show was u ever defined. So it is certain that you already had used ...

9 years ago | 0

| accepted

Answered
How can I get rid off this problem in fzero?
The error message states the problem clearly. Your objective is not defined at the endpoints of the interval that you supplie...

9 years ago | 0

| accepted

Answered
Find intersections by using fzero
1. Create a new function that is the difference of them. I'll give you this one, because many people misunderstand how to use fu...

9 years ago | 3

Answered
How to center vector to mean zero?
Standardize a vector, by centering to have mean 0, and variance 1. x = rand(100,1); x = (x-mean(x))/std(x); Subtracti...

9 years ago | 2

| accepted

Answered
problem using factorial in matlab
You cannot solve it with a double precision result, because it will overflow the dynamic range of a double. factorial(200) ...

9 years ago | 0

| accepted

Answered
Random positive numbers with constant sum
First of all, there is no such thing as a random positive number. If you don't define the distribution, then it is meaningless t...

9 years ago | 0

| accepted

Load more