Answered
finding values common to 3 different single-column matrices
Out = <http://www.mathworks.com/matlabcentral/fileexchange/28341-set-functions-with-multiple-inputs intersectm>(A,B,C)

15 years ago | 2

Answered
positive solutions to Ax=b
x = lsqlin(A,b,[],[],[],[],0) Least squares with lower bounded x's to 0.

15 years ago | 4

Answered
cell array or multidimensional array?
Cell arrays have significant overhead and they are slower wrt do a double nD array but they can mix datatypes.

15 years ago | 1

Answered
ismember() returning without unique indexing
[tf,loc] = ismember(b,a); loc.' = 2 2 4 4 4 4

15 years ago | 2

| accepted

Answered
boxplot - different group sizes
Say you have: A = rand(20,1); and you want the first 5 value to be for one group, then the rest 15 for the second. Create an...

15 years ago | 0

Answered
creating a unique variable for the outputs of a for loop?
See this FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F The example taken f...

15 years ago | 0

Answered
Why do you come to "MATLAB Answers"?
*abcegi* Listed in alphabetical order, you wanna how I rank them, no wayyyyy.

15 years ago | 1

Answered
problem with for loop
for ii = 10.^(1:5)

15 years ago | 1

Answered
xlswrite - clear cells and write multiple values
The easiest would be to write to a new sheet (see xlswrite options) Or using activex as explained in this post (clears all shee...

15 years ago | 0

Answered
matlab challenge- searching range of data to see if certain values exist
# Import the file with xlsread (is that an xlsx?) # Convert dates into serial dates # Use logical indexing/ismember to locate...

15 years ago | 1

Answered
How to plot with initially undefined number of lines in a .m file
Yes you can make it dynamic with: myPlot(X,Y,legend,axis,title) For say *n* graphs: * X,Y are m by n double arrays, or ...

15 years ago | 0

Answered
Actxserver Excel Save as function
function saveAsExcel % Figure S.fh = figure('units','pixels',... 'position',[500 500 200 100],... 'menubar...

15 years ago | 2

| accepted

Answered
trying to reaccunting the subcarriers
subcarrierIndex = 0:52;

15 years ago | 0

Answered
Excel reading - xlsread
Use the second output of xlsread. [data, text] = xlsread(...); The first three columns and the first row is interpreted as c...

15 years ago | 1

Answered
Problem in appending matrices in vertical form
* no trace of finalData declaration (where does it come from) * you don't need the inner loop. Keep just the command inside.

15 years ago | 0

Answered
How do I use CFTOOL?
From the fitting panel save to workspace the model and: 1. Use the following code to get the mathematical expressiona and the...

15 years ago | 2

Answered
dividing a column matrix based on the no
A = [0 0 0 1 1 1 1 0 0 0 0 2 2 2 2 0 0 0 0].'; Split sequence (transforming in string) out = regexp(sprintf('%d',A) ,'(1...

15 years ago | 0

| accepted

Answered
A simple way to view what code a gui/toolbox (such as PDE Toolbox) is using/doing?
No simple way with lots of code written by somebody else (and sometimes even by yourself if you didn't comment it) Set a breakp...

15 years ago | 0

Answered
Place(s) of greatest deviation
Y = [0 0 0 0.5 0.5]; X = [0 0 0 1 1]; absdiff = abs(X-Y); pos = find(max(absdiff) == absdiff); % or [trash,pos] =...

15 years ago | 0

Answered
Datenum Problem
Your textscan is not consistent with the lines you posted: textscan(fid,'%s %s %*f %*s %*f For: s s s ...

15 years ago | 1

| accepted

Answered
How to import multiple .xlsx files all within the current directory in an organizational manner?
I don't understand what's your problem. Your approach for importing multiple files is correct. You cannot have a "handle" to a ...

15 years ago | 0

| accepted

Answered
how to plot percentage on y axis
Here's an example of how to set % values for the Y axis:รน % Example input L = 0:.1:1; % Plot plot(1:numel(L),L);...

15 years ago | 0

Answered
Using ranksum function
Use *<http://www.mathworks.com/help/toolbox/stats/signrank.html signrank>*: p = signrank(x) performs a two-sided signed rank ...

15 years ago | 1

Answered
Regression Estimates, Maximum Likelihood, Ordinary Least Squares
When the errors are distributed normally then OLS (easiest) = MLE (numerical solution) * <http://en.wikipedia.org/wiki/Ordina...

15 years ago | 2

| accepted

Question


Datenum incoherent documentation
>> datenum('13/03/2011',24) ans = 6819 >> datenum('12/03/2011',24) ans = 734840 datenum('13/...

15 years ago | 2 answers | 0

2

answers

Answered
Create time intervals of a time vector
Vector of 9:00 - 17:30 with 15 mins increments (24 hours a day, 96 quarters a day) dv = 9/24:1/96:17/24+2/96; Visualize resu...

15 years ago | 4

| accepted

Answered
Toeplitz Matrix
toeplitz([1 2 3 0 0 0],[1 0 0 0])

15 years ago | 2

Answered
Monte Carlo
This example is what you're looking for: <http://www.vertex42.com/ExcelArticles/mc/MatlabMCExample.html> MC is computationally ...

15 years ago | 0

| accepted

Answered
finding neighbor value
*EDITED* To make it flexible n = distance from center A = randi(170,17,13); center = [8 7]; n = 2; % Bound...

15 years ago | 0

Answered
read different file formats then return their values
fid = fopen('fullpath/namefile.cep'); % In read mode by default data = textscan(fid,repmat('%f',1,15),'Delimiter',' '); ...

15 years ago | 0

| accepted

Load more