Feeds
문제를 풀었습니다
Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...
대략 4년 전
문제를 풀었습니다
Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...
대략 4년 전
문제를 풀었습니다
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,....
대략 4년 전
문제를 풀었습니다
Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...
대략 4년 전
문제를 풀었습니다
Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...
대략 4년 전
문제를 풀었습니다
Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...
대략 4년 전
문제를 풀었습니다
Solve a System of Linear Equations
*Example*: If a system of linear equations in _x₁_ and _x₂_ is: 2 _x₁_ + _x₂_ = 2 _x₁...
대략 4년 전
문제를 풀었습니다
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 C...
대략 4년 전
문제를 풀었습니다
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 y...
대략 4년 전
문제를 풀었습니다
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...
대략 4년 전
문제를 풀었습니다
Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...
거의 10년 전
문제를 풀었습니다
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:...
거의 10년 전
문제를 풀었습니다
Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...
거의 11년 전
문제를 풀었습니다
Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...
대략 11년 전
문제를 풀었습니다
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]
11년 초과 전
질문
Rapid Stateflow.Transition finding
Is there a rapid way to find all the 'Stateflow.Transition' from a state A, to a state B?
11년 초과 전 | 답변 수: 1 | 0
1
답변질문
Java error at the matlab start
Why do I receive the Java error message *Exception "java.lang.IllegalArgumentException: failed to parse:"while constructing D...
11년 초과 전 | 답변 수: 0 | 0
0
답변문제를 풀었습니다
Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...
11년 초과 전
질문
Pre-allocation of array of objects, or 'complex data'
In order to improve perfomances, is it possible to pre-allocate memory for an array of objects (ie. class' instantiation)? If th...
11년 초과 전 | 답변 수: 1 | 0
1
답변문제를 풀었습니다
Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...
11년 초과 전
문제를 풀었습니다
The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
11년 초과 전
문제를 풀었습니다
How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...
11년 초과 전
문제를 풀었습니다
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.
11년 초과 전
문제를 풀었습니다
Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...
11년 초과 전
문제를 풀었습니다
Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...
11년 초과 전
문제를 풀었습니다
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...
11년 초과 전
문제를 풀었습니다
Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...
거의 12년 전
문제를 풀었습니다
Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...
거의 12년 전
문제를 풀었습니다
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...
거의 12년 전