解決済み


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

約4年 前

解決済み


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

約4年 前

解決済み


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

約4年 前

解決済み


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

約4年 前

解決済み


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

約4年 前

解決済み


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

約4年 前

解決済み


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

約4年 前

解決済み


Find mistyped words in text (mixed-up letters)
Mistyped words are a regular occurrence in emails, texts, status updates, and the like. Many times, people send or post a second...

約4年 前

解決済み


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

約4年 前

解決済み


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

約4年 前

解決済み


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

約4年 前

解決済み


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

約4年 前

解決済み


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

約4年 前

解決済み


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

約4年 前

解決済み


Transposition as a CIPHER
This all about transcripting a text message. If the input string is: s1 = 'My name is Sourav Mondal', then the output is: s2 = '...

約4年 前

解決済み


Return the first and last characters of a character array
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

約4年 前

解決済み


Decimal Comparison
*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...

約4年 前

解決済み


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifm...

約4年 前

解決済み


Without the French accent please!
Suppress the French accent. Example 'Déjà présent' -> 'Deja present'

約4年 前

解決済み


letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

約4年 前

解決済み


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

約4年 前

解決済み


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

約4年 前

解決済み


Create a vector
Create a vector from 0 to n by intervals of 2.

約4年 前

解決済み


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

約4年 前

解決済み


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

約4年 前

解決済み


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

約4年 前

解決済み


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

約4年 前

解決済み


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

約4年 前

解決済み


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

約4年 前

解決済み


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

約4年 前

さらに読み込む