Solved


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

nästan 6 år ago

Solved


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

nästan 6 år 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...

nästan 6 år 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...

nästan 6 år 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...

nästan 6 år ago

Answered
Can someone help me filling holes in the image attached and make it a perfect binary image with all holes filled?
You might want to have a look at binary morphological operators like opening and closing: https://www.cs.auckland.ac.nz/course...

nästan 6 år ago | 0

| accepted

Solved


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

nästan 6 år ago

Answered
How can I convert this for if loop into a while loop?
x=6*rand(1,10)+2 i = 1; while i<11 if i<5 x(i)=-1; elseif i>=5 && i<8 x(i)=1; else ...

nästan 6 år ago | 1

| accepted

Answered
How to round the decimal?
You might want to check out this function for that: <https://nl.mathworks.com/matlabcentral/fileexchange/26212-round-with-sig...

ungefär 6 år ago | 1

Answered
Unable to find explicit solution using solve function
You might want to have a look at the productlog function to get an analytic solution without solve. You could fill in the genera...

ungefär 6 år ago | 0

Answered
How can I get the weight of object in image ?
For that you would need to estimate the volume and know the density of the food. That doesn't really have a trivial solution.

ungefär 6 år ago | 0

Solved


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

mer än 8 år ago

Solved


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

mer än 8 år ago

Solved


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

mer än 8 år ago

Solved


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

mer än 8 år ago

Solved


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

mer än 8 år ago

Solved


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

mer än 8 år 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 ...

mer än 8 år ago

Solved


radius of a spherical planet
you just measured its surface area, that is the input.

mer än 8 år ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

mer än 8 år ago

Solved


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

mer än 8 år 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 ...

mer än 8 år 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...

mer än 8 år 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:...

mer än 8 år ago