Solved


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

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

12 years ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

12 years ago

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

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


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

12 years ago

Solved


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

12 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

12 years ago

Solved


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

12 years ago

Solved


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

12 years ago

Solved


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

12 years ago

Solved


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

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

Answered
error occuring
I'll go ahead and throw out the obvious, ensure that 'bw2' is a 2-dimensional numeric matrix. <http://www.mathworks.com/help/to...

12 years ago | 0

Answered
cheby1
Chebyshev Type 1 filter design <http://www.mathworks.com/help/toolbox/signal/ref/cheby1.html> 1-D digital filter <http:...

12 years ago | 0

| accepted

Solved


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

12 years ago

Solved


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

12 years ago

Answered
Function definitions are not permitted at the prompt or in scripts
If I'm reading your website correctly, you're saying that this is a script named fftAI.m: [d, time] = getdata(ai, ai.Sample...

12 years ago | 0

Answered
What do you think of Cody, new service for MATLAB Central
I like Cody as a set of brain teasers that may force you to think about fairly unique problem that you may not have encountered ...

12 years ago | 2

Answered
GUIDE-edit text
you would put that code that you wrote in the edittext callback function.

12 years ago | 0

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

Answered
naming a structure
You can use eval, but eval needs to be used with extreme care. You can really screw things up accidentally. eval([NewName '...

12 years ago | 2

| accepted

Answered
Processing files using a for loop
something like this: myDir = uigetdir; %gets directory myFiles = dir(fullfile(myDir,'*.wav'); %gets all wav files in str...

12 years ago | 16

Answered
Does "sortrows" not work with a semicolon?
Works fine for me. I did this: a = magic(5); b = sortrows(a,-1); When you say, does not work, do you mean it gives yo...

12 years ago | 0

Answered
changing the style in a loop with hold all...
I found a solution to this, which I just put in your previous question. If you set the default colororder and linestyleorder,...

12 years ago | 4

| accepted

Answered
How do I create a legend and include loop variable values in the labels?
Not in the way that you're currently doing it, but if you're not married to the idea of using your P variable how you currently ...

12 years ago | 6

Solved


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

12 years ago

Answered
plotting problem
Have you tried just adjusting the y-axis scale? doc axis

12 years ago | 0

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

Load more