Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

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

circa 3 anni fa | 1

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


Find the Pattern 1

circa 3 anni fa

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

circa 3 anni fa | 0

Risolto


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.

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

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

circa 3 anni fa | 0

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

circa 3 anni fa | 1

| accettato

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

circa 3 anni fa | 1

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

circa 3 anni fa | 1

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

circa 3 anni fa | 0

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

circa 3 anni fa | 1

| accettato

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

circa 3 anni fa | 1

| accettato

Risolto


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

circa 4 anni fa

Risolto


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

circa 4 anni fa

Carica altro