Answered
The length of the intersection curve between a sphere and a cylinder
I won't do your homework. I'll get you off to a good start, in fact, probably more than you deserve, since you appear to have ma...

7 years ago | 2

| accepted

Answered
How to calculate the euclidean distance in matlab?
Actually, that is simply NOT the formula for Euclidean distance. You need to take the square root to get the distance. So, you s...

7 years ago | 0

Answered
Error using command integral
Simplest is to just use cumtrapz. All you want is a plot anyway. u = linspace(0,4,1000); fun = @(x)exp(-x.^2); plot(u,cumtrap...

7 years ago | 1

| accepted

Answered
estimating the parameter of an equation
Um, don't use fminsearch? In fact, I'm not sure why you would want to do it that way. d = 17; n = 10000; kk=randn(n,1); u=...

7 years ago | 0

| accepted

Answered
Regarding Increase Resolution?
I'll take a stab at it. There are many tmes when we see in the movies, on TV, the idea that you can get almost anything out of ...

7 years ago | 2

| accepted

Answered
How to perform mathematical operation between all elements of arrays with unequal numbers
A = rand(2,3); B = rand(4,5); C = A + reshape(B,[1,1,size(B)]); % Addition C = A - reshape(B,[1,1,size(B)]); % subtraction ...

7 years ago | 1

| accepted

Answered
Difference Between Curve Fitting and Surface Fitting
A curve, thus y=f(x), is a function of ONE independent variable. A surface, thus z=f(x,y), is a function of TWO independent var...

7 years ago | 0

Answered
What computer should I buy?
READ THE SYSTEM REQUIREMENTS. https://www.mathworks.com/support/requirements/matlab-system-requirements.html They suggest that...

7 years ago | 0

Answered
Promoting MATLAB at the higher edu institution I work for
This is not a question you could ask on Answers. Note that we are volunteers, not paid representatives of The MathWorks. As we...

7 years ago | 0

Answered
Error: index must be a positive integer or logical.
You wrote this: Bs(0)=-(imag(yo)); MATLAB is not whatever other language you came from. MATLAB has an index origin of 1, NOT 0...

7 years ago | 2

Answered
VAN DER PAUW equation
First, see that no symbolic solution will exist. If we have the general problem: exp(-A*x) + exp(-B*x) == 1 then by the tra...

7 years ago | 2

Answered
Function roots. Fixed-point iteration
First, what are the roots? Are you trying to solve the problem q(x) == 0? Or are you trying to solve the problem q(x)==x? A fix...

7 years ago | 1

Answered
solving nonlinear equation by fsolve
Using max inside an objective that will then be applied to fsolve is a bad idea. It creates a function that is at best non-diffe...

7 years ago | 0

Answered
Conditional statement with vectors
help discretize

7 years ago | 0

Answered
Why my result is 0×1 empty double column vector
Um, LOOK AT WHAT YOU DID? eqn eqn = [ 0 == 5780664229092589/18446744073709551616, 0 == 5780664229092589/18446744073709551616,...

7 years ago | 2

Answered
Getting a smooth curve instead of two linear functions
You have two lines that create what is NOT a function, in the sense that it is single valued. So, for any x, you get a y out. He...

7 years ago | 0

Answered
Y=sqrt((A^2*X^2+B^2*X^2)/(C+D^2*X^2))
People still seem to be missing that the fit will NOT be unique. The model cannot be estimated uniquely as it has been posed. Fi...

7 years ago | 2

Answered
How to solve extra long equations with multiple unknowns?
You have two fairly complicated equations, in two unknowns. Why do you expect an analytical solution to exist at all? I'd have b...

7 years ago | 0

| accepted

Answered
How to explain a bad performance rating using the bench command?
Lots of reasons are possible. The ones that come to mind immediately are: Were you running something else at the same time? Bro...

7 years ago | 0

Answered
How do I randomly generate numbers with a certain amount of probability?
As is often the case, I would suggest you are overthinking this. You have a sequence of 24 pairs of images to be shown. There ...

7 years ago | 0

Answered
Randomly dividing an integer (non-uniform distribution)
The problem with the alternative answers given, is they tend to have a flaw, in that they do not sample the space of interest we...

7 years ago | 2

Answered
How to plot a variable in MATLAB which can not be separated explicitly ?
Is ln meant to denote the NATURAL logarithm? If so, then you use log in MATLAB. At first, I thought you mean to write lin, whic...

7 years ago | 0

| accepted

Answered
could anyone help me how to reshape the matrix.
You are not asking to do a reshape, which does not change the total number of elements. A = A(1,:);

7 years ago | 0

| accepted

Answered
generating a sequence of numbers
Not if a1, a2, a3, a4, etc., are separate variables. If that is what you have done, then it is time to learn to program in ways ...

7 years ago | 0

| accepted

Answered
extrapolate the plot to the point out of the interval
You can't. Well, you can, but interp1 will give you meaningless garbage, as it should. Extrapolation is a dangerous thing. And ...

7 years ago | 1

Answered
why it can't be used as a number?
It can be used as a number, IF you understand what you are doing. MATLAB works in DOUBLE PRECISION. A double precision number w...

7 years ago | 3

| accepted

Answered
An example of using crammers rule or geuss elimination?
Don't use either of them! There are many examples of things that you might learn to use when doing homework, and in class as a s...

7 years ago | 0

Answered
Cannot use fzero function
My guess is you did not actually save that function as an m-file on your search path. This is why MATLAB could not find the func...

7 years ago | 1

Answered
How to define nuclear norm in matlab?
What is difficult to program? A quick search online suggests it is the L-1 norm of either the vector of singular values, or of t...

7 years ago | 0

| accepted

Answered
Why won't this program run?
Because you don't understand how to use the function zeros? Go back to go, do not collect $200, and read the getting started tut...

7 years ago | 1

Load more