Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

fast 6 Jahre vor

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

fast 6 Jahre vor | 0

| akzeptiert

Gelöst


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

fast 6 Jahre vor

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

fast 6 Jahre vor | 1

| akzeptiert

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

etwa 6 Jahre vor | 1

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor