A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Concatenate two strings
Its very easy. Just concatenate two strings.

plus de 8 ans il y a

A résolu


Double summation
Write two nested for loops to calculate the following double summation: <<https://drive.google.com/uc?id=0B74PAULDIwwsWFhlNTV...

plus de 8 ans il y a

A résolu


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

plus de 8 ans il y a

A résolu


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

plus de 8 ans il y a

A résolu


Matlab Basics - Sum a vector
Write a script to add up all the elements in a vector e.g. x = [1 2 3 4] --> output = 10

plus de 8 ans il y a

A résolu


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

plus de 8 ans il y a

A résolu


ASCii Code
Using Matlab get the ASCii for '?'

plus de 8 ans il y a

A résolu


Max of a Vector
Write a function to return the max of a vector

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

plus de 8 ans il y a

A résolu


Model a simple pendulum
Model a simple pendulum of length 200cm with bob of mass 100g and plot the position in degrees. The pendulum starts at 30 degree...

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

Charger plus