Gelöst


most frequent character
Obtain the most frequent character. For example, s='balaram'; output='a'; If there is a tie between letters, return t...

mehr als 6 Jahre vor

Gelöst


Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA'

mehr als 6 Jahre vor

Gelöst


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

mehr als 6 Jahre vor

Beantwortet
How do I get my MATLAB editor to read UTF-8 characters? UTF-8 characters in blank squares in editors, but in the command window and workspace works fine.
% read in the file fID = fopen(filename, 'r', 'n', 'UTF-8'); bytes = fread(fID); fclose(fID); The data read from the file ca...

mehr als 6 Jahre vor | 0

Gelöst


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

fast 7 Jahre vor

Gelöst


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

etwa 7 Jahre vor

Gelöst


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

etwa 7 Jahre vor

Gelöst


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

etwa 7 Jahre vor

Gelöst


Logic array: Identifying qualifying times
Create a logic array qualifyingIndex with true for any location where the runner is male with a running time less than 8.2. Row ...

mehr als 8 Jahre vor

Gelöst


Integer indexing array: Reverse subsets
Construct an indexing array copySubset so that the statement reversedOrder = origOrder(copySubset); results in a row array begin...

mehr als 8 Jahre vor

Gelöst


Concatenating arrays
* Assign studentIDs with concatenated row arrays groupA and groupB

mehr als 8 Jahre vor

Gelöst


Relational operators and row arrays: Overweight baggage
Create a logical indexing array overweightBaggage with true in each location where the corresponding baggageWeight is greater th...

mehr als 8 Jahre vor

Gelöst


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

mehr als 8 Jahre vor

Gelöst


Function definition: Volume of a pyramid
Define a function CalculatePyramidVolume with inputs baseLength, baseWidth, and pyramidHeight. The function returns pyramidVolum...

mehr als 8 Jahre vor

Gelöst


Computing wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

mehr als 8 Jahre vor

Gelöst


Function definition: Double down.
* Complete the DoubleDown function to return twice the initialValue.

mehr als 8 Jahre vor

Gelöst


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

mehr als 8 Jahre vor

Gelöst


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

mehr als 8 Jahre vor

Gelöst


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

mehr als 8 Jahre vor

Gelöst


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

mehr als 8 Jahre vor

Gelöst


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

mehr als 8 Jahre vor

Gelöst


UICBioE240 problem 1.4
So if A = [ 1 2 3; 4 5 6; 7 8 9] B = [ 3 3]

mehr als 8 Jahre vor

Gelöst


y equals x divided by 2
function y = x/2

mehr als 8 Jahre vor

Gelöst


prime test
find largest 2 digit prime number

mehr als 8 Jahre vor

Gelöst


Find maximum value of a curve
Two vectors shall be already defined: - Input vector x (e.g. x = 0:1:10) - Result vector y (e.g. y = sin(x)) Create a n...

mehr als 8 Jahre vor

Gelöst


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

mehr als 8 Jahre vor

Gelöst


Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

mehr als 8 Jahre vor

Gelöst


Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

mehr als 8 Jahre vor

Gelöst


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Mehr laden