Solved

Track Logic

A sensor produces either a hit (1) or a miss (0) for a given target once per scan. The sensor is also equiped with a tracker whi...

28 giorni ago

Solved

Removing rows from a matrix is easy - but what about inserting rows?

Assume A is a 5-by-5 matrix. A([2,4],:) = [] is a quick way to remove rows 2 and 4. Can you find a quick way to insert rows into...

28 giorni ago

Solved

convert 2D array of ones and zeros to checkerboard array of [1,2] where the original array was ones and zero elsewhere

Given a 2D array of ones and zeros, generate an equivalent sized checkerboard array of ones and twos. The checkerboard pattern s...

29 giorni ago

Solved

Pythagorean perfect squares: find the square of the hypotenuse and the length of the other side

Given the square root of a square number, *seed*, and a range, *n*, find the square number, *Z* as well as the other side, *y*, ...

29 giorni ago

Solved

fly fly away

A fly moves following a predefined sequence of discrete jumps (defined by the vectors _dx_ and _dy_) repeating the same sequence...

29 giorni ago

Solved

Given the name from the legend, return the handle

Write a function that will return the handle to the desired object. The input for this function will be a string which represent...

29 giorni ago

Solved

Fixed-Point Iteration

Perform fixed-point iteration to estimate the root of a nonlinear equation.

29 giorni ago

Solved

Assign matrix elements to separate variables

Given an input array, return each element of the array as a separate variable. If the number of output arguments (k) is less tha...

29 giorni ago

Solved

The Python Challenge, Level 1: Decode strings

This problem is based on <http://www.pythonchallenge.com/pc/def/map.html Level 1 of The Python Challenge>, which is just a serie...

29 giorni ago

Solved

Error handling

If the input is a negative number, generate an error. Otherwise, return the number.

29 giorni ago

Answered

Getting error in code - program to solve Poissonâ€™s equation in 1D

Tom, The index i runs from 1 to N, but if rho has N elements, then rho(i+1) will give an error if i = N.

Getting error in code - program to solve Poissonâ€™s equation in 1D

Tom, The index i runs from 1 to N, but if rho has N elements, then rho(i+1) will give an error if i = N.

circa un mese ago | 0

Answered

how to plot a temperature distribution of a solid cylinder with heat generation

Kailey, Here are a few comments: You are plotting one point at a time, but with that plot statement, you won't see any points....

how to plot a temperature distribution of a solid cylinder with heat generation

Kailey, Here are a few comments: You are plotting one point at a time, but with that plot statement, you won't see any points....

circa un mese ago | 0

Solved

Return the sequence element I

Given a positive integer, x, return a positive integer, y, which is the xth term in the sequence [1 2 2 3 3 3...], in which one ...

circa un mese ago

Solved

Three grind is shipsstraigt

A function that returns either 'Rock', 'Scissors', or 'Paper' (string). You may succeed or you may fail the (case insensitive) t...

circa un mese ago

Solved

Find triangles from edge

First input is T, a Triplet list of indices -whom each row actually contains the three indices of a triangle vertices-. size(T) ...

circa un mese ago

Solved

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

circa un mese ago

Solved

Positive Definiteness of a Matrix

Determine if input matrix is positive definite or not.

circa un mese ago

Solved

Construct a "diagAdiag" matrix

Construct a matrix whose elements begin from 1 and end at n^2 with the order of arrangement as shown below: For: n = 4 ...

circa un mese ago

Solved

Stress-Strain Properties - 8

Up to this point, you've calculated some material properties based on tensile stress-strain data. For this problem, you are task...

circa un mese ago

Solved

Stress-Strain Properties - 7

The toughness of a material is technically defined as the plastic strain energy absorbed by the material (the olive region in th...

circa un mese ago

Solved

Community Problem 500!

In honor of this being the 500th Community problem, see if you can create a function that has a Cody size of 500. It can do any...

circa un mese ago

Solved

Find index of a string in a cell array

Write a function that finds the index at which the cell array of strings C contains the exact string S. So if C = {'twe...

circa un mese ago

Solved

A little bit of luck needed

This one may require a little bit of guess work, but it is possible. Hints: - The same solution might fail the tests once and ...

circa un mese ago

Solved

Remove duplicated triangles

Input T is a triangulation (triplet list of indices -positive integers-, each index refering to a vertex number in a correspondi...

circa un mese ago

Solved

Find neighbor triangle indices

First input T is a triangulation (triplet list of indices -positive integers-, each index refering to a vertex number in a corre...

circa un mese ago

Answered

How do I subtract every row of a matrix with every row of a second matrix?

Here's how I understood the question. If you have A = magic(3) and B = eye(3)--that is, A = [8 1 6; 3 5 7; 4 9 2]; B = [1 0 ...

How do I subtract every row of a matrix with every row of a second matrix?

Here's how I understood the question. If you have A = magic(3) and B = eye(3)--that is, A = [8 1 6; 3 5 7; 4 9 2]; B = [1 0 ...

circa un mese ago | 0

| accepted

Solved

Code Wheel

Create a function that offsets each value in a given string by a given amount. For instance, codewheel('hello',1) s...

circa un mese ago