Solved


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

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

14 years ago

Solved


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

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

14 years ago

Solved


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

14 years ago

Solved


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

14 years ago

Solved


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

14 years ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

14 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

14 years ago

Answered
Can't sort this code
You do not have 2 lines on the graph: it goes from left to right & back again. After some noodling, I think you want to replace...

14 years ago | 0

Answered
plotting RMSE
Assuming you are calculating x and xhat in a loop with an index variable(e.g. k), then err(k)=sqrt(sum(x(1:k,1)-xhat(1:k,1)...

14 years ago | 0

Answered
Rotate Individual Letters in a String
t = 'sine' flipud(t') ans = e n i s

14 years ago | 1

Answered
producing the magnitude of the butterworth graph
replace your plot(...) with semilogx(frequency,mag); semilog does its own plotting

14 years ago | 0

| accepted

Answered
Crossvalidation techniques in PLSR
http://blogs.mathworks.com/loren/2011/11/21/subset-selection-and-regularization/

14 years ago | 0

Answered
Inserting current date in string
sprintf('today is %s',datestr(now()))

14 years ago | 0

| accepted

Answered
Help with nonlinear robost fitting on nlinfit function. fminsearch works fine but not nlinfit.
you need to tell nlinfit that funtest is a function by adding a @ in front of it. e.g. ndata = 1.0e+003 * ... [0.1...

14 years ago | 0

Answered
\-operator to perform least squares fit on multiple sample-sets
The \ operator can do that already. See my answer here http://www.mathworks.com/matlabcentral/answers/24086-ols-regression-fo...

14 years ago | 0

Answered
Multiple regression analysis, categorial variables, continuous variable
as long as you have one category variable, you can use just (0,1). If , for example you had more than one category (small cap...

14 years ago | 0

| accepted

Answered
Data curve fitting, connecting point
Karim, lose the for loop and just issue the plot command as shown below clear; close all; clc; % Specify value fo...

14 years ago | 0

| accepted

Answered
Transformation from a quadrilateral to a rectangle
you need the <http://www.vision.caltech.edu/bouguetj/calib_doc/ calibration matrix> or you can browse Zhang's site at Microso...

14 years ago | 0

Answered
Molecule to matrix
I don't know if it applies in your case, but the only things I have seen are: bucky % and gplot

14 years ago | 0

Answered
normal distribution test
for normalization you can try the <http://en.wikipedia.org/wiki/Power_transform Box-Cox transformation> or the <http://www.mini...

14 years ago | 0

Answered
Having no success using point by point division to derive impulse estimate. What am I doing wrong?
you are successful using deconv; which is analogous to division in the frequency domain. I suggest you do the division in the f...

14 years ago | 0

Answered
Poincare plot for hrv
I don't know what the variable odstepRR is, but a reasonable assumption would lead to this as the Poincare plot plot(xm,xp,...

14 years ago | 0

| accepted

Answered
HRV frequency domain analizys
* ULF ms2 Power in the ULF range 0.003 Hz * * VLF ms2 Power in the VLF range 0.003-0.04 Hz * * LF ms2 Power in the LF range 0....

14 years ago | 0

Answered
Deriving PDF from a given signal without using the hist() function?
I am not sure I understand, but take a look at: doc ksdensity

14 years ago | 1

| accepted

Answered
problem with scatter/bubble plot
something like this? t = 0:pi/6:2*pi t(13)=[]; x = cos(t); y = sin(t); c = spring(12); scatter(x,y,[],c,'filled')

14 years ago | 0

| accepted

Answered
Double-x subscript in Pxx, Signal Process Toolbox document
I guess to differentiate it from cross power spectrum Pxy

14 years ago | 0

| accepted

Answered
if loop not executing
use reshape to organize your values into 8 rows and 10 columns. You can then use mean() after your multiplications & divisions. ...

14 years ago | 0

| accepted

Answered
??? Subscript indices must either be real positive integers or logicals
matlab is ones based, not zeros... x(0) is an error *[edit]* works fine for me (added \n in fprintf statement) d=0.5; ...

14 years ago | 0

| accepted

Load more