문제를 풀었습니다


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

8년 초과 전

문제를 풀었습니다


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

8년 초과 전

문제를 풀었습니다


UICBioE240 2.8
Convert x number of hours into seconds.

8년 초과 전

문제를 풀었습니다


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

8년 초과 전

질문


Using regexp to identify matches
I am trying to identify matches using the command regexp. I am trying to isolate either the first subset of a string (e.g. 4002...

8년 초과 전 | 답변 수: 0 | 0

0

답변

질문


How to join the subelements of a cell?
I am trying to express all sentences in one cell with string subelements. s='I am George. John is there? Ana is around! Are ...

8년 초과 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


Square a Number
Given an input x, return y, which is equal to the square of x.

8년 초과 전

문제를 풀었습니다


give nth decimal place of pi
max 15th place after the decimal point is ok for now

8년 초과 전

문제를 풀었습니다


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

8년 초과 전

문제를 풀었습니다


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

8년 초과 전

문제를 풀었습니다


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

8년 초과 전

문제를 풀었습니다


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

8년 초과 전

문제를 풀었습니다


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

8년 초과 전

문제를 풀었습니다


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

8년 초과 전

문제를 풀었습니다


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

8년 초과 전

문제를 풀었습니다


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

8년 초과 전

질문


Sum of matrix elements after using regexp
I wrote the following code to sum all number after locating numeric values from a string by using regexp. s='2 groupd 40cel...

8년 초과 전 | 답변 수: 1 | 0

1

답변

문제를 풀었습니다


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

8년 초과 전

문제를 풀었습니다


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

8년 초과 전

문제를 풀었습니다


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

8년 초과 전

문제를 풀었습니다


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

8년 초과 전

문제를 풀었습니다


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

8년 초과 전

문제를 풀었습니다


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

8년 초과 전

문제를 풀었습니다


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

8년 초과 전

질문


What is wrong with the code?
I am trying to find the logest subsequence of 1s in a string. I am doing something wrong. s='01010101110001011100010111000...

8년 초과 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

8년 초과 전

문제를 풀었습니다


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

8년 초과 전

문제를 풀었습니다


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

8년 초과 전

질문


Proper use of regexprep
I want to remove the consonants of a string, using regexprep. How can I modify the initial string s1 with a string s2? s...

8년 초과 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

8년 초과 전

더 보기