Answered
Projection of 3D points on plane
Why do you think the original distances between the points should be the same after a projection? NOT SO!!!!!!! In fact, it is t...

4 years ago | 0

Answered
Optimization of function of 3 variables
You need first to define this as a function handle. Then you need to use FMINCON as the solver, or GA will also work. The const...

4 years ago | 1

Answered
Calculating the mathematical expression
There are two possible questions in this. You have a vector y, and a vector z. You wish to evaluate the expression for x, for A...

4 years ago | 0

| accepted

Answered
I can't calculate the integral function in this exampleCan anyone give me some advice? thank you
You can't use a tool like int to integrate a vector of numbers. In fact, all you were doing is integrating a constant. Instead,...

4 years ago | 0

Answered
Need help to solve nonlinear ode in matlab
Just for kicks, I had to try solving this using dsolve to see what it would do. syms u(x) T = 1; R = 0.5; % Just picking a va...

4 years ago | 0

| accepted

Answered
Termination tolerance with fzero function
As Torsten suggests, you cannot use fzero with no initial guess. In fact, fzero runs better with a bracket, than just a single g...

4 years ago | 2

Answered
Why am I getting an out of index error?
You created the function handle J. J has argument x1. So inside J, it sees whatever you pass in as x1, apparently you think th...

4 years ago | 0

Answered
linear least square with nonlinear constraints
Fmincon requires a single objective to optimize. So if you have a set of 18 equations, in 12 unknowns, then you formulate the ob...

4 years ago | 0

| accepted

Answered
How would you impliment this optimization in MATLAB?
This is a moderately simple problem with 5 unknowns. Another solver may be safer, because of the absolute values, but they are i...

4 years ago | 1

| accepted

Answered
Finding erf using Maclaurin series breaks down around x = 5
Do you expect that all infinite series are convergent? And sometimes, even a series that is theoretically convergent for all x, ...

4 years ago | 0

Answered
minimum distance between a given set of point and a curve
Simplest is to use my code distance2curve, as found on the file exchange. It finds the distance to a general space curve, to eac...

4 years ago | 0

| accepted

Answered
How to numerically solve and plot definite integral with variable upper limit
There are many trivial ways. Off the top of my head ... Repeatedly integrate, using a tool like integral, from 0 to x, then plo...

4 years ago | 0

Answered
Vandermonde-like matrix
The easiest way? Probably this line: (in R2016b or later) x.^(((0:-1:1-n)' + (0:-1:1-n))/2) If you want to use two lines of co...

4 years ago | 1

Answered
Best way to get rid of/ prevent function from creating complex numbers?
You cannot simply force that a complex number will never arise. There is no flag you can just set to tell MATLAB to never create...

4 years ago | 1

Answered
Buy or trial MatLab R2009b
NOBODY can just give it to you. Can you buy it? You can get a current license. That would, in theory, alow you to download an o...

4 years ago | 0

Answered
Define an event in a signal
So, are you asking someone to teach you how to write a gui interface that will do all of this? That is a big request, and it wil...

4 years ago | 0

Answered
Program helix spiral with radius?
This does not seem to be obviously a homework problem. so... To solve such a problem, you need to understand a spiral, and what...

4 years ago | 1

| accepted

Answered
I am trying to find the roots of this equation but my code doesn't work. It keeps saying theta0 is unrecognized,
It appears that your equation is: theta0= x*tan(theta0)-4.905*(x^2)/((v0^2)*((cos(theta0))^2))-(y0-yf); and you wish to solv...

4 years ago | 0

Answered
When I'm using the fmincon function to solve an optimization problem,the optimization result is always near the initial value. How to avoid this situation?
Resetting the step tolerance will probably not help. In fact, that may be a bad idea, or it may be what you need. Before you try...

4 years ago | 1

Answered
Unrecognized function or variable 't'.
Contact the authors of the paper, as apparently having submitted crap for code with undefined variables. Worse, it got accepted ...

4 years ago | 0

| accepted

Answered
How to remove the Matlab Drive from a Mac?
Are you talking about the virtual drive used when MATLAB is installed? Assuming that is what you mean, just EJECT the drive. On...

4 years ago | 0

Answered
How to solve two equations with two unknowns that are vectors?
Sometimes, we get lost in wanting to solve a problem one way, when really, the solution is trivial, if we but look at the proble...

4 years ago | 0

Answered
Interpolation (interp2 help)
Interp2 does NOT apply to scattered data. You chose the wrong interpolation tool. You MAY be able to use help scatteredInterpo...

4 years ago | 0

| accepted

Answered
How does one find the max value of one column and relate it to another column?
Read the help for max. What are the outputs? help max Do you see the SECOND output argument from max? That tells you where the...

4 years ago | 0

Answered
multiple 2d plot in 1 3D plot with common origin point
Not nearly as hard as it may seem. Or, maybe this seems like it should be easy, and so my solution is actually harder than you w...

4 years ago | 0

| accepted

Answered
How to plot x=y2
Has nobody yet fully answered this question? Since it is now long past the time when a homework answer would have done homework ...

4 years ago | 2

Answered
Can I input data with multiple column lengths into one matrix?
No. Sorry, but no. A matrix cannot have columns that vary in length. A matrix in MATLAB is a rectangular array of scalar element...

4 years ago | 1

Answered
hi my assignment requires product of all diagonal elements, i did a simply look as copied below, but could only pass the test on one case and failed all others. can you please
If I had to guess, it is because the value of n was never properly defined as the size of the matrix U! For example: U = rand(...

4 years ago | 0

Answered
I am trying to make a matrix (10x100) called 'DemClay' with a slope of -1 to -0.5 incrementally if possible, so that the first row is -1 and the last row is -0.5
Pretty easy. And soooo many ways to do it. This is a simple one: DemClay = repmat(linspace(-1,-0.5,10)',[1,100]); size(DemClay...

4 years ago | 1

| accepted

Answered
Counting liberties on a Go (Baduk, Weiqi) board
This link defines the rules for a liberty: https://www.yourturnmyturn.com/rules/go.php I read them only quickly, but I think I...

4 years ago | 0

| accepted

Load more