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

etwa 7 Jahre 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 7 Jahre vor

Gelöst


Will there be a new leader?
Simply answer the title.

etwa 7 Jahre vor

Gelöst


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

etwa 7 Jahre vor

Gelöst


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

etwa 7 Jahre vor

Gelöst


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

etwa 7 Jahre vor

Gelöst


Determine the square root
Determine the square root of the value the user has entered, n.

etwa 7 Jahre vor

Gelöst


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

etwa 7 Jahre vor

Gelöst


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

etwa 7 Jahre vor

Gelöst


Energy of a photon
*&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883* Given the frequency F of a photon in giga hertz. Find energy E of this...

etwa 7 Jahre vor

Gelöst


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

etwa 7 Jahre 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 7 Jahre vor

Gelöst


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

etwa 7 Jahre vor

Gelöst


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

etwa 7 Jahre vor

Gelöst


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

etwa 7 Jahre 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 ...

etwa 7 Jahre vor

Gelöst


Equal to their cube
Tell me three real numbers that are equal to their cubes?

etwa 7 Jahre vor

Gelöst


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

etwa 7 Jahre vor

Gelöst


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

etwa 7 Jahre vor

Gelöst


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

etwa 7 Jahre vor

Gelöst


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

etwa 7 Jahre vor

Gelöst


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

etwa 7 Jahre vor

Gelöst


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

etwa 7 Jahre vor

Gelöst


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

etwa 7 Jahre vor

Gelöst


Your favourite city!
Type your favourite city.

etwa 7 Jahre vor

Gelöst


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

etwa 7 Jahre vor

Gelöst


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

etwa 7 Jahre vor

Gelöst


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

etwa 7 Jahre vor

Gelöst


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

etwa 7 Jahre vor

Gelöst


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

etwa 7 Jahre vor

Mehr laden