Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

ongeveer 3 jaar ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar ago

Answered
Need to read data from text format to matlab
I was able to reproduce your error as below: A = str2num('') % An empty character vector; Result: A = [] B = str2num([]) % An ...

ongeveer 3 jaar ago | 1

Solved


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

ongeveer 3 jaar ago

Solved


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

ongeveer 3 jaar ago

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

ongeveer 3 jaar ago

Solved


Find the Pattern 1

ongeveer 3 jaar ago

Answered
Finding the shortest path
After you have found the minimum value of the function, you can simply replot over the same line in a different color. The most ...

ongeveer 3 jaar ago | 0

Solved


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.

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar ago

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar 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 ...

ongeveer 3 jaar 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...

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar 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...

ongeveer 3 jaar ago

Solved


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

ongeveer 3 jaar 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...

ongeveer 3 jaar ago

Answered
it says the right side does not equal to the left i dont know what should i do can anyone help me pls?
If the error says "Unable to perform assignment because the left and right sides have a different number of elements" the issue ...

ongeveer 3 jaar ago | 0

Answered
how to get matlab to disply zero as the last value
a,b, and h are 18x1 so you'll only get 18x1 unless you add a zero at the end. You can do that in a few ways: x(19)=0; %or x(...

ongeveer 3 jaar ago | 1

| accepted

Answered
How can I plot coordinates up on a map?
You can use the hold command to plot two things to the same figure. imshow('map_image') hold on plot(points_of_interest_x,poi...

ongeveer 3 jaar ago | 1

Answered
Saving image in correct format or how do I save only image-part of the figure?
This answer by Adam Danz shows how you can remove the borders and interactive parts of the figure window. After you've done so,...

ongeveer 3 jaar ago | 1

Answered
Index exceeds the number of array elements(3)
The error Index exceeds the number of array elements (3). This means that you are asking for an element beyond the boundaries ...

ongeveer 3 jaar ago | 0

Answered
How to supply perticular varargin entries of the 'main_function(varargin)' to a 'subfunction(varargin_new)'?
Solution When you call the original function, you do so with original_function(arg1,arg2,arg3,arg4,..) Using varargin lets ...

ongeveer 3 jaar ago | 1

| accepted

Answered
How to import a column from an Excel file?
Since it seems that you just need to get rid of the NaN values, try using logical indexing with the isnan command. p_time = p_t...

ongeveer 3 jaar ago | 1

| accepted

Solved


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

ongeveer 4 jaar ago

Solved


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

ongeveer 4 jaar ago

Load more