Community Profile

photo

James Roberts


Last seen: 2 years ago Active since 2019

Statistics

  • Solver

View badges

Content Feed

View by

Solved


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


Rounding
Round 10.67 and make 'y' equal to that number.

4 years ago

Solved


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

4 years ago

Solved


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

4 years ago

Solved


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]

4 years ago

Solved


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

4 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

4 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

4 years ago

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

4 years ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

4 years ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

4 years ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

4 years ago

Solved


Return area of square
Side of square=input=a Area=output=b

4 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

4 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

4 years ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

4 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

4 years ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

4 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

4 years ago