Answered
Cross-sectional area of a cone(ish)
And polyarea won't suffice to compute the area of a polygon? It should. Just generate the contours as desired. Then use polya...

10 years ago | 0

| accepted

Answered
error in fmincon and solver stopped prematurely
It appears as if the optimizer stopped. It seems happy with the result. So whats the problem? The constraints are satisfied. ...

10 years ago | 0

Answered
Random partner (n=10), no repeats.
Easy peasy, and very possible, as long as you stop after 9 rounds of problems. Using pencil and paper. As I said, this is a r...

10 years ago | 0

| accepted

Answered
Boundary value problem in optimization formulation
Of course, I recall that ODE45 has no capability to apply equality constraints at the end point, as that would make it a BVP sol...

10 years ago | 1

| accepted

Answered
hello , i use the following code , the loop is running to (o=30) . More than 30 value does not work and display the Warning (Index exceeds matrix dimensions) .. What correct it in order to complete iteration?
Shiver. Obscene code. Not a single comment. Variables that have no apparent meaning to anyone, even the author. All to compute s...

10 years ago | 1

| accepted

Answered
Matrix-vector multiplication vectorization
If you are storing tham in a 5x3 array, then they are 1x3 vectors, not 3x1. There is a difference. Anyway, A*v' Won'...

10 years ago | 2

Answered
float point arithmetic and vpasolve
I've tried to delete some of the extraneous fluff you have in that code, but even there, you have some serious potential problem...

10 years ago | 0

| accepted

Answered
Fitting a function to data (fminsearch) with limits
fminsearch has no capability to take bounds on the search. If the objective is such that a better result lies outside of where y...

10 years ago | 7

| accepted

Answered
Intersection of two sfit planes?
So what was the problem? :) Let me guess. This problem will come down to solving what is effectively a 4th degree polynomial....

10 years ago | 0

Answered
Strange ML errors for simple scripts
They are not serious error messages. YET. In fact, they are not error messages at all. At some point in time, the code in questi...

10 years ago | 0

Answered
How to properly write model function?
READ the error message. What is the little pointer pointing at? Does this expression represent the product of p(3) and x? ...

10 years ago | 0

| accepted

Solved


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

10 years ago

Problem


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

10 years ago | 9 | 388 solvers

Solved


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

10 years ago

Solved


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

10 years ago

Solved


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

10 years ago

Solved


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

10 years ago

Solved


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

10 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

10 years ago

Solved


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

10 years ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

10 years ago

Solved


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

10 years ago

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

10 years ago

Solved


Integer indexing array: Weekend box office
The row array movieBoxOffice stores the amount of money a movie makes (in millions of $) for the 7 days of a week, starting with...

10 years ago

Answered
How to find the amount of data generated/memory requirment for a program?
Sorry. It is not possible to do these things in general. MATLAB uses dynamically generated variables and arrays. So the memor...

10 years ago | 0

| accepted

Answered
WTMM for 1-D
The crystal ball is so foggy today. We don't know what the function wtmm does, since it is not part of MATLAB. Nor do we have ls...

10 years ago | 0

Answered
calling a subfunction failed
First of all, that is not a sub-function. If it is saved in a separate file, it is just an m-file, that anything can call. A ...

10 years ago | 0

Answered
checking for positive syms
Essentially you are asking to solve for the set of values for which some arbitrary function of a variable is positive. Even i...

10 years ago | 0

Answered
I am messing up Eigenvalues in a loop...Help me please.
Download <http://www.mathworks.com/matlabcentral/fileexchange/22885-eigenshuffle eigenshuffle> . It is designed to solve exactly...

10 years ago | 2

Answered
How can I reduce memory-use on this combinatorics computation?
clear m = 5; N = 2; a = [ones(N+m-1,1)' zeros(m,1)']; whos a Name Size Bytes Class Attri...

10 years ago | 1

Load more