Gelöst


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

mehr als 7 Jahre vor

Gelöst


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

mehr als 7 Jahre vor

Gelöst


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

mehr als 7 Jahre vor

Gelöst


Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

mehr als 7 Jahre vor

Gelöst


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

mehr als 7 Jahre vor

Gelöst


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

mehr als 7 Jahre vor

Gelöst


Create a square matrix of zeros of even order
Create a square matrix of zeros of even order

mehr als 7 Jahre vor

Gelöst


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

mehr als 7 Jahre vor

Gelöst


Find minimum and maximum elements of an array
For a given array find minimum and maximum elements of an array and store minimum value in first index of output and maximum in ...

mehr als 7 Jahre vor

Gelöst


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

mehr als 7 Jahre vor

Gelöst


Efficiency of a single phase Transformer
Calculate the efficiency of a single phase transformer whose KVA rating is A KVA, loading factor x,power factor p,full load copp...

mehr als 7 Jahre vor

Gelöst


Evened up (or not)
You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

mehr als 7 Jahre vor

Gelöst


Binary Neighbourhood
Given a natural number reorder its binary form to create another number, closest to the given one. Examples: * 1 gives 2, ...

mehr als 7 Jahre vor

Gelöst


De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

mehr als 7 Jahre vor

Gelöst


Find out the Gray Code for a Given Binary Number
Find out <http://en.wikipedia.org/wiki/Gray_code Gray Code> for a given binary number Example Binary input 1000 Gray ...

mehr als 7 Jahre vor

Gelöst


Convert to Binary Coded Decimal
Convert from decimal representation to <http://en.wikipedia.org/wiki/Binary-coded_decimal Binary Code Decimal> (or BCD) represen...

mehr als 7 Jahre vor

Gelöst


Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that include the four bas...

mehr als 7 Jahre vor

Gelöst


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

mehr als 7 Jahre vor

Gelöst


Efficiency of a single phase Transformer
Calculate the efficiency of a single phase transformer whose KVA rating is A KVA, loading factor x,power factor p,full load copp...

mehr als 7 Jahre vor

Gelöst


Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

mehr als 7 Jahre vor

Gelöst


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

mehr als 7 Jahre vor

Gelöst


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

mehr als 7 Jahre vor

Gelöst


Calculate Resistance
Calculate Resistance R of a linear conductor having resistivity p, length l and area A

mehr als 7 Jahre vor

Gelöst


Calculate Resistance 2
In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

mehr als 7 Jahre vor

Gelöst


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

mehr als 7 Jahre vor

Gelöst


Add 3 numbers
In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

mehr als 7 Jahre vor

Gelöst


Add 3 numbers
In this problem, you have to add three numbers a, b and c. Give output d = add(a,b,c)

mehr als 7 Jahre vor

Gelöst


Power Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that represent powers. Fo...

mehr als 7 Jahre vor

Gelöst


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

mehr als 7 Jahre vor

Gelöst


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

mehr als 7 Jahre vor

Mehr laden