已解决


With apologies to William Blake
Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

3 years 前

已解决


Data decompression
A chunk of data is to be 'decompressed'. Input: * compressed: a row vector of uint8 values. This is the compressed data. ...

3 years 前

已解决


Project Euler: Problem 18, Maximum path sum I
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bott...

3 years 前

已解决


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

3 years 前

已解决


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

3 years 前

问题


Poly2mask, drawpolygon or patch
Recently, I tried to plot a polygon in matlab, and I found there is a lot of embedded function that can be used. However, some f...

3 years 前 | 1 | 14 个解题者

已解决


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

3 years 前

已解决


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

3 years 前

已解决


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

3 years 前

已解决


Equal to their cube
Tell me three real numbers that are equal to their cubes?

3 years 前

已解决


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

3 years 前

已解决


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

3 years 前

已解决


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

3 years 前

已解决


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

3 years 前

已解决


UICBioE240 problem 1.3
Find the length of a vector. So if A = [1 1 1 1 1] Then B = 5

3 years 前

已解决


Product of Array
Given an array of numbers. Get the product of the array.

3 years 前

已解决


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

3 years 前

已解决


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

3 years 前

已解决


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

3 years 前

已解决


04 - Scalar Equations 3
Define the variables a, b, and c: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b....

3 years 前

已解决


Min of a Matrix
Return the minimum value in the given matrix.

3 years 前

已解决


Array of Ones
Create a 100 X 100 array of ones.

3 years 前

已解决


03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)

3 years 前

已解决


06 - Matrix Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

3 years 前

已解决


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

3 years 前

已解决


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

3 years 前

已解决


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

3 years 前

已解决


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

3 years 前

已解决


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

3 years 前

已解决


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

3 years 前

加载更多