解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

回答済み
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 ...

3年弱 前 | 1

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


Find the Pattern 1

3年弱 前

回答済み
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 ...

3年弱 前 | 0

解決済み


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.

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

解決済み


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

3年弱 前

回答済み
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 ...

3年弱 前 | 0

回答済み
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(...

3年弱 前 | 1

| 採用済み

回答済み
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...

3年弱 前 | 1

回答済み
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,...

3年弱 前 | 1

回答済み
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 ...

3年弱 前 | 0

回答済み
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 ...

3年弱 前 | 1

| 採用済み

回答済み
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...

3年弱 前 | 1

| 採用済み

解決済み


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

約4年 前

解決済み


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

約4年 前

さらに読み込む