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

13 years ago

Solved


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

13 years ago

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]

13 years 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]; and ...

13 years ago

Problem


Convert a cell-array of values to MATLAB source code
The MATLAB interpreter loads your code and executes it using the Read-Evaluate-Print-Loop (see <http://en.wikipedia.org/wiki/REP...

13 years ago | 1 | 10 solvers

Solved


Convert a cell-array of values to MATLAB source code
The MATLAB interpreter loads your code and executes it using the Read-Evaluate-Print-Loop (see <http://en.wikipedia.org/wiki/REP...

13 years ago

Solved


Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

13 years ago

Solved


Hermite Polynomials
Return the _n_-th <http://en.wikipedia.org/wiki/Hermite_polynomials Hermite polynomial> of the physicists' type. Assume that ...

13 years ago

Solved


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

13 years ago

Solved


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

13 years ago

Solved


When can one be the Life Member of the IEEE?
Consult the site http://en.wikipedia.org/wiki/Ieee from where it can be seen that IEEE Members who have reached the age of 65 an...

13 years ago

Answered
publish a document with some pictures and no code
Have you looked at 'publish' command where some additional markup on your M-files can convert them into spiffy looking HTML, RTF...

13 years ago | 0

Problem


RPN Calculator for simple arithmetic expressions
Reverse-Polish-Notation (RPN) is a machine friendly form of calculating expressions. Example, to evaluate, (1+2)*4 + 5 - 3 you ...

13 years ago | 1 | 13 solvers

Solved


RPN Calculator for simple arithmetic expressions
Reverse-Polish-Notation (RPN) is a machine friendly form of calculating expressions. Example, to evaluate, (1+2)*4 + 5 - 3 you ...

13 years ago

Solved


How long do each of the stages of the rocket take to burn?
A space rocket has 3 stages: - stage 1, s1; - stage 2, s2; - stage 3, s3. If s1 burns 3 x as long as s2 which burns ...

13 years ago

Problem


Is the paranthesis sequence balanced ?
Quantum mechanics and computer science are interested in <http://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation bra-kets>. Today...

13 years ago | 3 | 197 solvers

Solved


Is the paranthesis sequence balanced ?
Quantum mechanics and computer science are interested in <http://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation bra-kets>. Today...

13 years ago

Solved


Einsteinium-253 decay
Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds. Given 1000mg of Einsteinium-253 at t=0 days, how much is lef...

13 years ago

Answered
Import text file with header
z=textread('filename.dat','%s','delimiter','\n') z=z(4:end) q=regexp(z,',','split') data = reshape(str2double([q{:}])...

13 years ago | 0

Answered
How to function a sum
You can try something like, function val = Req( fhandle, arg, N ) val = 1; for itr = N:-1:1 %build from sma...

13 years ago | 0

Solved


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

13 years ago

Solved


It's race time! Write a faster function than the test suite call of unique().
Write a function to get unique elements of a vector faster than unique()! Input will be a vector (of integers or floating point ...

13 years ago

Solved


Decoding : Find the value
'u' in the function below is of type char or string and 'v' is of type int or double. function y = your_fcn_name( u, v) ...

13 years ago

Solved


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

13 years ago

Answered
Graphing the result of a regression in Matlab
You are missing all the '*' product signs between your polynomial coefficients and the variable; wrong MATLAB syntax doesn't get...

13 years ago | 0

Answered
Trying to code two angular acceleration equations and angles
To give you a hint, 1/0 = Inf, 0/0 = NaN. So you need to avoid doing these things in your code. Special case the situations w...

13 years ago | 0

Answered
How do I call a plot from a function in a GUI?
When using the GUI, you should create a new figure() and save the handle to it. h = figure(); plot(h, x_axis, y_axis, la...

13 years ago | 0

Answered
read binary file into matrix
Pay attention to the 'source' and 'precision' options to fread(). >> doc fread is your friend Example from, <http://www...

13 years ago | 0

Answered
How to open a file and store it in cell array?
See documentation pages for, fopen, fgetl, fread, fscanf, fclose >> doc fgetl Function fgetl, fread and fscanf return ...

13 years ago | 0

| accepted

Answered
Random Integers from a preconstructed non uniform distribution
A well known approach is called the 'Box Mueller' method. You generate a uniform random variable [0,1] to index into the cumulat...

13 years ago | 0

| accepted

Load more