Gelöst


Find the largest number
Find the largest number |x| among 4 numbers given as variables |a|, |b|, |c|, and |d|. Example: Input: a = 4; b = 7; c ...

mehr als ein Jahr vor

Gelöst


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

mehr als ein Jahr vor

Gelöst


Matlab Basics - y as a function of x
Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

mehr als ein Jahr vor

Gelöst


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

mehr als ein Jahr vor

Gelöst


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr 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 ...

mehr als ein Jahr vor

Gelöst


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

mehr als ein Jahr 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.

mehr als ein Jahr vor

Gelöst


Reverse a matrix
Its simple. You have to reverse a given matrix.

mehr als ein Jahr vor

Gelöst


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

mehr als ein Jahr vor

Gelöst


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

mehr als ein Jahr vor

Gelöst


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

mehr als ein Jahr vor

Gelöst


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

mehr als ein Jahr 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:*...

mehr als ein Jahr vor

Gelöst


What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

mehr als ein Jahr 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...

mehr als ein Jahr vor

Gelöst


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

mehr als ein Jahr vor

Gelöst


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

mehr als ein Jahr vor

Gelöst


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

mehr als ein Jahr vor

Gelöst


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

mehr als ein Jahr vor

Gelöst


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

mehr als ein Jahr vor

Gelöst


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

mehr als ein Jahr vor

Gelöst


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

mehr als ein Jahr vor

Gelöst


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

mehr als ein Jahr vor

Mehr laden