Submitted


N-dimensional find
FIND_NDIM Finds the first or last nonzero element indices along a given matrix dimension.

13 years ago | 1 download |

5.0 / 5
Thumbnail

Answered
How to set axis values using a vector.
Hi Jonathon, I think your problem has one of the following solutions: _1. Your image is a perfect "grid", but you want t...

13 years ago | 1

| accepted

Answered
Parsing a Large Text File into Sections
Hi Amanda, This should work for you. It just reads the input file one line at a time and prints that line to an output file. ...

13 years ago | 0

| accepted

Answered
Point inside triangle(s)?
So here's an answer (that works!) using dot products. Imagine one vertex of a triangle. The two edges stemming from that vert...

13 years ago | 0

Question


Point inside triangle(s)?
Hi all, here's a little puzzle that I've confused myself over for the last hour... it's time to clear my head. I have 4 trian...

13 years ago | 5 answers | 0

5

answers

Answered
If else If statment embedded in a for loop with a constraint?
Hi Clifford, Your description (from the comments above) will only happen if the second 10 numbers are an exact copy of the firs...

13 years ago | 0

Answered
For loop involving concatenation
Hi Kyze, here's *method 1*, which is just to replace your repeated code with a loop (one to read from excel, one to plot): ...

13 years ago | 0

| accepted

Answered
How do I retrieve individual elements from an object all at once?
If the contents of your object's field is numeric, you can make a matrix like this: myNumVector = [Object.myNum]; To get...

13 years ago | 1

| accepted

Solved


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

13 years ago

Answered
How can I calculate volume from scattered points?
Hi Daniel, From your picture, it seems that your points are all centered around the [0 0 0] coordinate (and even if they were...

13 years ago | 0

| accepted

Answered
Easy question for you geniuses, what is wrong with my input for this matlab function?
I believe you've gotten (understandably) confused with: delaunay() and DelaunayTri() The first one does a delau...

13 years ago | 1

| accepted

Solved


Eliminate unnecessary polygon vertices
Suppose you have an n-point polygon represented as an n-by-2 matrix of polygon vertices, P. Assume that the polygon is closed; t...

13 years ago

Answered
Help with vectorizing Diag command
Hi Brendan, is this the answer you're looking for? M = 2, N = 3 oldMat = reshape(1:M*N,M,N) newMat = zeros(M,N,N) ...

13 years ago | 0

Question


.NET assembly - can I call a method with a second "out" argument?
Hi all, Short version: Is it possible to use a method of a dotnet assembly that returns its second value as a double? Desp...

13 years ago | 0 answers | 0

0

answers

Solved


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

14 years ago

Solved


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

14 years ago

Solved


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

14 years ago

Solved


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

14 years ago

Solved


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

14 years ago

Solved


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

14 years ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

14 years ago

Solved


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

14 years ago

Answered
for loop concatenation for datasets
Hi Joe, The following loop: # makes some random data (20-by-2) # initialises a variable called *allData* to start as 20-b...

14 years ago | 0

| accepted

Solved


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

14 years ago

Solved


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

14 years ago

Solved


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

14 years ago

Answered
xlswrite - not accepting stored string as valid 'A1' format for Excel
G'day Mowgli, The problem is that xcolo is a cell, but it's being referenced with parentheses: xlcol = {'A3'; 'J3'; 'S3'...

14 years ago | 1

| accepted

Solved


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

14 years ago

Answered
finding out the frequencies of numbers within coloumns
Hi Yasmine. Let's first make some random temperatures and moistures: tempmoist = randi(20,200,2); Now let's find the uni...

14 years ago | 0

| accepted

Solved


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

14 years ago

Load more