
Zhiheng Pan
MathWorks
Followers: 0 Following: 0
Feeds
문제를 풀었습니다
subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.
대략 22시간 전
문제를 풀었습니다
Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.
4일 전
문제를 풀었습니다
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...
4일 전
문제를 풀었습니다
Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....
5일 전
문제를 풀었습니다
MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8
6일 전
문제를 풀었습니다
Find my birthday
Given a birth date x, find my age when my birth day will fall on the same day as I was born. So if I was born on Monday, what ag...
7일 전
문제를 풀었습니다
Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...
8일 전
문제를 풀었습니다
String Logic 19
Examples: 'DIG' --> 'I' 'IMPORTANT' --> 'MOTN' 'DEAL' --> 'EL' 'LIMB' --> 'IB' 'MOSTLY' --> 'OTY'
11일 전
문제를 풀었습니다
Partial pivoting for Gauss Elimination
Write a function to implement partial pivoting for Gauss elimination, given the pivot element.
12일 전
문제를 풀었습니다
String Logic 6
Examples: 'CAT' --> 216 'DOG' --> 218 'ROSY' --> 333 'MATLAB' --> 433 'TRUST' --> 418 'MOSTLY' --> 488
12일 전
문제를 풀었습니다
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.
12일 전
문제를 풀었습니다
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 ...
12일 전
문제를 풀었습니다
Predict Cricket Stridulation Rate from Air Temperature
Stridulation is the process that creates a cricket's “chirp” by rubbing their wings or legs. According to the Old Farmer's Alma...
13일 전
문제를 풀었습니다
Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as y = A.ⅇ^(-λt)*cos(2πft) where A, λ, and f are scalars and t is a vector. ...
13일 전
문제를 풀었습니다
Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...
13일 전
문제를 풀었습니다
How many Christmas presents under the tree?
For many families at Christmas, each family member gives 1 present to every other family member. The main exception is that chil...
15일 전
문제를 풀었습니다
Calculate days until Christmas
Provided with inputs year, month, day e.g. 2019,11,12, calculate the number of days until the next Christmas day, i.e. the next ...
18일 전
문제를 풀었습니다
Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....
22일 전
문제를 풀었습니다
Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...
22일 전
문제를 풀었습니다
Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...
22일 전
문제를 풀었습니다
Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you n...
22일 전
문제를 풀었습니다
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:...
22일 전