Gelöst


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

etwa ein Monat vor

Gelöst


Shorten pathname
Given a pathname string, return a condensed version by replacing intermediate folders with '..'. *Example* If fullpat...

etwa ein Monat vor

Gelöst


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

etwa ein Monat vor

Gelöst


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

etwa ein Monat vor

Gelöst


only input
Return the output without writing any code into the function.

etwa ein Monat 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 ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

etwa ein Monat vor

Gelöst


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

etwa ein Monat vor

Gelöst


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

etwa ein Monat vor

Gelöst


テレビのサイズを求めてみよう
あなたは電気屋で働いています。 あなたの電気屋にテレビを買いに来たお客さんに「何インチのテレビを買いたいのか」と質問したところ、対角線の情報しかわからないと言われてしまいました。 しかし、テレビのインチを知るには、幅と高さの情報が必要です。 ...

etwa ein Monat vor

Gelöst


特定の値がベクトル内に含まれているかを確認するコードを書こう
ベクトル b にあるスカラ値 a が含まれていれば出力として 1 を返し、含まれていなければ 0 を返すような関数を作成しましょう。 例: a = 3; b = [1,2,4]; スカラ値 3 はベクトル b に含まれていない...

etwa ein Monat vor

Gelöst


Find Logic 4

etwa ein Monat vor

Gelöst


How to permute given 3d matrix?
A(:,:,1)=[1 3] A(:,:,2)=[2 2] A(:,:,3)=[4 3] Change rows to columns and columns to rows, similar to transpose. Resul...

etwa ein Monat vor

Gelöst


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

etwa ein Monat vor

Gelöst


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

etwa ein Monat vor

Gelöst


Find the max element of the array
Find the max element of the array

etwa ein Monat vor

Gelöst


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

etwa ein Monat vor

Gelöst


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

etwa ein Monat vor

Gelöst


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

etwa ein Monat vor

Gelöst


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

etwa ein Monat vor

Gelöst


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

etwa ein Monat vor

Gelöst


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

etwa ein Monat vor

Gelöst


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

etwa ein Monat 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 ein Monat vor

Gelöst


Extract a specific part of matrix!
In the given matrix, extract element that have odd rows and column number. For example A=[1 4 2 3 5] B=extractodd(A);...

etwa ein Monat vor

Mehr laden