Jan Valdman
Followers: 0 Following: 0
Associate professor of applied mathematics https://sites.google.com/site/janvaldman/ Professional Interests: FEM, nonlinear computational mechanics, a posteriori error estimates, MATLAB vectorizations
Feeds
문제를 풀었습니다
Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?
4개월 전
문제를 풀었습니다
Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...
4개월 전
문제를 풀었습니다
Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...
4개월 전
문제를 풀었습니다
Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
4개월 전
문제를 풀었습니다
Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...
거의 4년 전
문제를 풀었습니다
Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
대략 4년 전
문제를 풀었습니다
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 = ...
대략 4년 전
문제를 풀었습니다
Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]
대략 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. <<https://i.imgu...
대략 4년 전
문제를 풀었습니다
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...
대략 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년 전
문제를 풀었습니다
Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...
대략 4년 전
문제를 풀었습니다
Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...
대략 4년 전
문제를 풀었습니다
Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...
대략 4년 전
문제를 풀었습니다
Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...
대략 4년 전
문제를 풀었습니다
Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...
대략 4년 전
문제를 풀었습니다
Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
4년 초과 전
문제를 풀었습니다
Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...
대략 5년 전
문제를 풀었습니다
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 ...
대략 5년 전
문제를 풀었습니다
Determine if input is odd
Given the input n, return true if n is odd or false if n is even.
대략 5년 전
문제를 풀었습니다
Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...
대략 5년 전
문제를 풀었습니다
Complex number
For complex number c=a+bi, write code that will add a and b together.
대략 5년 전
문제를 풀었습니다
Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...
대략 6년 전
문제를 풀었습니다
Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...
대략 6년 전
문제를 풀었습니다
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
대략 6년 전
문제를 풀었습니다
Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...
대략 6년 전
문제를 풀었습니다
Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...
7년 초과 전
문제를 풀었습니다
Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...
7년 초과 전