Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


UICBioE240 2.8
Convert x number of hours into seconds.

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Frage


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

etwa 8 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


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

etwa 8 Jahre vor | 2 Antworten | 0

2

Antworten

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Frage


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

etwa 8 Jahre vor | 1 Antwort | 0

1

Antwort

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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!

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre 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] ...

etwa 8 Jahre vor

Frage


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

etwa 8 Jahre vor | 2 Antworten | 0

2

Antworten

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Gelöst


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

etwa 8 Jahre vor

Frage


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

etwa 8 Jahre vor | 2 Antworten | 0

2

Antworten

Gelöst


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

etwa 8 Jahre vor

Mehr laden