A soumis


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

plus de 13 ans il y a | 1 téléchargement |

5.0 / 5
Thumbnail

Réponse apportée
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...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
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. ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 13 ans il y a | 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...

plus de 13 ans il y a | 5 réponses | 0

5

réponses

Réponse apportée
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...

plus de 13 ans il y a | 0

Réponse apportée
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): ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 13 ans il y a | 1

| A accepté

A résolu


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

plus de 13 ans il y a

Réponse apportée
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...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 13 ans il y a | 1

| A accepté

A résolu


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...

plus de 13 ans il y a

Réponse apportée
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) ...

plus de 13 ans il y a | 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...

plus de 13 ans il y a | 1 réponse | 0

0

réponse

A résolu


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...

presque 14 ans il y a

A résolu


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...

presque 14 ans il y a

A résolu


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...

presque 14 ans il y a

A résolu


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: ...

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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...

presque 14 ans il y a

A résolu


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.

presque 14 ans il y a

A résolu


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...

presque 14 ans il y a

Réponse apportée
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...

presque 14 ans il y a | 0

| A accepté

A résolu


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...

presque 14 ans il y a

A résolu


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...

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

Réponse apportée
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'...

presque 14 ans il y a | 1

| A accepté

A résolu


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...

presque 14 ans il y a

Réponse apportée
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...

presque 14 ans il y a | 0

| A accepté

A résolu


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

presque 14 ans il y a

Charger plus