James Roberts
Followers: 0 Following: 0
Feeds
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.
4년 초과 전
문제를 풀었습니다
Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.
4년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...
4년 초과 전
문제를 풀었습니다
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.
4년 초과 전
문제를 풀었습니다
Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.
4년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
Determine if input is odd
Given the input n, return true if n is odd or false if n is even.
4년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전
문제를 풀었습니다
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년 초과 전