Gelöst


Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

6 Monate vor

Gelöst


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

6 Monate vor

Gelöst


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

6 Monate vor

Gelöst


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

6 Monate vor

Gelöst


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

6 Monate vor

Gelöst


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

6 Monate vor

Gelöst


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

6 Monate vor

Gelöst


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] is s...

6 Monate vor

Gelöst


Angle bisectors
Given 2 direction vectors, calculate the *_two_ (2) normalized angle bisectors* (which are perpendicular between them). Input...

6 Monate vor

Gelöst


Fun with a compass
Each night for the past week, you have been having the same nightmare: You find yourself back in your junior high school geometr...

6 Monate vor

Gelöst


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and h=...

6 Monate vor

Gelöst


Find the Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find the area of polygon enclosed by the...

6 Monate vor

Gelöst


Minimal cost
A power house, P, is on one bank of a straight river W meters wide, and a factory, F, is on the opposite bank L meters downstrea...

6 Monate vor

Gelöst


Find Elements in Range
Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

6 Monate vor

Gelöst


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

6 Monate vor

Gelöst


Sum My Indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

6 Monate vor

Gelöst


James Bond film count
Twenty-three James Bond films have been produced, in the years 1962, 1963, 1964, 1965, 1967, 1969, 1971, 1973, ... 197...

6 Monate vor

Gelöst


Calculating Student Grades
The matrix grades contains raw grades for 7 students who took your course. Each row represents a different student. The first 7 ...

6 Monate vor

Gelöst


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

6 Monate vor

Gelöst


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

6 Monate vor

Gelöst


Divisible by 6
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

6 Monate vor

Gelöst


Sum of the pixel values for the blue color
Calculate the sum of the pixel values for the blue color, with a picture as an input. NOTE: The picture will be provided as a m...

6 Monate vor

Gelöst


Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

6 Monate vor

Gelöst


Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

6 Monate vor

Gelöst


Find an optimal placement of coolers on a grid
In a certain chemical plant, 6 new pieces of cooling equipment (coolers) are to be installed in a vacant space. This vacant spac...

6 Monate vor

Gelöst


Characterize fluid flow in a pipe as to laminar or turbulent
In fluid mechanics, characterizing the flow in a pipe is essential to predicting its behavior. The flow pattern can either be la...

6 Monate vor

Gelöst


Starburst Mandala
Create a mandala starburst using diagonal and orthogonal symmetry in a matrix.

6 Monate vor

Gelöst


Hourglass Mandala
Generate an hourglass shape using matrix geometry and symmetry. e.g. N = 5; 1 1 1 1 1; 0 1 1 1 0; ...

6 Monate vor

Gelöst


Vertical Mirror Mandala
Create a symmetric left-right mirrored pattern in an N×N matrix to emulate mandala reflection symmetry. e.g. N = 5; ...

6 Monate vor

Gelöst


Circular Ring Approximation Mandala
Generate a matrix that approximates a circular ring using distance-based thresholding , a visually rich mandala-inspired challen...

6 Monate vor

Mehr laden