解決済み


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

7年以上 前

解決済み


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

7年以上 前

解決済み


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

7年以上 前

解決済み


Assignment statements based on input value
Write an if-else statement that assigns finalValue with userValue + 5 if userValue is greater than 100. Otherwise assign finalVa...

7年以上 前

解決済み


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

7年以上 前

解決済み


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

7年以上 前

解決済み


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

7年以上 前

解決済み


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

7年以上 前

解決済み


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

7年以上 前

解決済み


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

7年以上 前

解決済み


Small aircraft weight limit
Write an if-else statement that evaluates to true if the sum of passengerWeight and cargoWeight is less than or equal maxWeight....

7年以上 前

解決済み


Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

7年以上 前

解決済み


Binary Coder
Take an input number and print the binary value of this number.

7年以上 前

解決済み


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

7年以上 前

解決済み


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

7年以上 前

解決済み


Back to basics 24 - Symbolic variables
Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

7年以上 前

解決済み


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

7年以上 前

解決済み


Bridge toll
Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pound...

7年以上 前

解決済み


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

7年以上 前

解決済み


Writing a while loop
Write a while loop that continues to increment userValue by 5 until userValue is less than 0.

7年以上 前

解決済み


While loop: Summation
Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...

7年以上 前

解決済み


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

7年以上 前

解決済み


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

7年以上 前

解決済み


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

7年以上 前

解決済み


DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

7年以上 前

解決済み


ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122

7年以上 前

解決済み


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

7年以上 前

解決済み


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

7年以上 前

解決済み


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

7年以上 前

解決済み


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

7年以上 前

さらに読み込む