Problem


Find a common edge
First input is T, a triplet list of indices. Second input is e = [e1 e2], a row vector, couple of indices (positive distinct int...

mehr als 2 Jahre ago | 1 | 15 solvers

Solved


Find a common vertex
First input is T, a triplet list of indices. Second input is i, a single index (positive integer). The goal of this function is ...

mehr als 2 Jahre ago

Problem


Find a common vertex
First input is T, a triplet list of indices. Second input is i, a single index (positive integer). The goal of this function is ...

mehr als 2 Jahre ago | 1 | 17 solvers

Solved


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

mehr als 2 Jahre ago

Answered
plot a mathmatical function
Perhaps you should have a look at linspace. u = linspace(1500,3000,16); % since there are 16 values between 1500 and 3000 wit...

mehr als 2 Jahre ago | 0

Question


Compatibility : get the Matlab minimum version required to run a program
Hey, Is there a way to automatically know which Matlab minimum version your .m program is compatible with ? Something like th...

mehr als 2 Jahre ago | 1 answer | 1

1

answer

Solved


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

mehr als 2 Jahre ago

Solved


Inner product of two vectors
Find the inner product of two vectors.

mehr als 2 Jahre ago

Solved


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

mehr als 2 Jahre ago

Solved


Return area of square
Side of square=input=a Area=output=b

mehr als 2 Jahre ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

mehr als 2 Jahre ago

Solved


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

mehr als 2 Jahre ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

mehr als 2 Jahre ago

Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

mehr als 2 Jahre ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

mehr als 2 Jahre 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,...

mehr als 2 Jahre ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

mehr als 2 Jahre ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

mehr als 2 Jahre ago

Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

mehr als 2 Jahre ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

mehr als 2 Jahre ago

Solved


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

mehr als 2 Jahre ago

Solved


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

mehr als 2 Jahre ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

mehr als 2 Jahre ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

fast 3 Jahre ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

fast 3 Jahre ago

Submitted


query neighbor indices function for ndtrigrid
Function to compute neighbor indices for a given index vector of a vertex generated by ndtrigrid

fast 3 Jahre ago | 3 downloads |

Thumbnail

Submitted


N dimension regular triangular grid
Regular triangular grid in any dimension Ndim.

fast 3 Jahre ago | 2 downloads |

Thumbnail

Submitted


powmspace
m-power spaced vector

fast 3 Jahre ago | 2 downloads |

Thumbnail

Submitted


expmspace
m base exponentially spaced vector

fast 3 Jahre ago | 1 download |

Thumbnail

Load more