Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

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

12 years ago

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.

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

12 years ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

12 years ago

Solved


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

12 years ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

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

12 years ago

Solved


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

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

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

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

12 years 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. Example...

12 years ago

Answered
if statment. why do i receive following statment: Operands to the || and && operators must be convertible to logical scalar values.
The error is occurring when the user enters a choice that is non-numeric and the conversion from *str2num* is empty (i.e. []) wh...

12 years ago | 3

| accepted

Answered
Extract numbers between two underscores.
You could just use the *strfind* function to find the underscores, and then extract the data in between those two values: st...

12 years ago | 1

Answered
hi ! i am developing a gui that basically takes input from the interface processes some calculation and generated graph of the calculated data with the trigerring of push button
Rohith - it is not all that clear from your question what the problem is. Is the file being generated with no data? Is the fil...

12 years ago | 0

| accepted

Answered
Setting working directory to Documents folder in user profile on Windows 7
I saw this function on the File Exchange, <http://www.mathworks.com/matlabcentral/fileexchange/32523-getusername/content/getUser...

12 years ago | 0

Answered
Sum of geometric series without loop
I'm not all that clear on why you are using *n=nargin* instead of just passing *n* into the function as the second input but may...

12 years ago | 0

| accepted

Answered
Problem while executing a switch case thread
Sriharsha - in the future, please just attach your code to your question using the paperclip button. Look at the case state...

12 years ago | 2

| accepted

Answered
Trying to define an array as the derivative of the terms of another array gives just zeros.
The following code is where the *dpx* and *dpy* matrices are set if x>1 && x<Nx_max %So that we don't run into an index be...

12 years ago | 0

Answered
Removing maxium and minimum from the matrix?
Since it is the minimum and maximum values in the second column that determine which rows are removed, then you could do somethi...

12 years ago | 2

Answered
Errors occurred during parsing of MATLAB function 'MATLAB Function'
Tasos - please edit your above code so that is formatted properly. Just highlight the code portions and press the *{} Code* but...

12 years ago | 0

| accepted

Answered
For to While Loop
I'm not sure why a *while* loop would be better in this case (because it adds a couple of more lines of code) but here is the *w...

12 years ago | 3

Answered
How can i remove the crop mark in gui?
You almost have it - you just need to assign the handle of the crop area to the *handles* object and then store this updated (ha...

12 years ago | 1

| accepted

Answered
Using radio button problem?
I think that your question title is a little misleading since there is no problem with the radio button, rather you are unsure o...

12 years ago | 2

Answered
How to use initial conditions with an equation?
Luis - no you don't need to use a for loop, but you will have to adjust your equations so that they can compute elementwise oper...

12 years ago | 1

Answered
The code(given) only store last points of intersection.How to store all points of intersection?
If there is a (for or while) loop that is calculating a particular value at each iteration and you want to save that value, then...

12 years ago | 0

| accepted

Answered
Reading data from textfile
Create a 600x1 vector as follows data = (1:1:600)'; which is just a column vector with values set as 1 2 3 4 5 6 ….600. ...

12 years ago | 0

| accepted

Answered
How to change default path on startup for Mac?
There is a *startup.m* file that you can update to change to another directory (I've done the same on my Mac) on start up. In t...

12 years ago | 0

Answered
Take data in, fit them to poly, calculate derivative at arbitrary cross points
Michele - you could try to use an anonymous function (see <http://www.mathworks.com/help/matlab/matlab_prog/anonymous-functions....

12 years ago | 0

| accepted

Load more