Answered
storing data from function
If you're using wavread inside a function then you have to return them to your *base* workspace explicitly because the workspace...

13 years ago | 0

| accepted

Answered
How to put strings on the x axes
neworder = { 'N2' [0.1700] 'HC' [0.1700] 'SAGD' [0.1800] 'Steamfloo...

13 years ago | 3

| accepted

Answered
hdf for loop
You are switching to another directory cd('C:\Users\Guest\Desktop') it means that it cannot find the files with name |fi...

13 years ago | 1

Answered
Histogram of joint probability distribution
You already have calculated the probabilities thus you have to use |bar3()| instead of |hist3()| (which is used when you still h...

13 years ago | 1

| accepted

Answered
Loop plus diff function with non-integers: Feasible?
If I understood correctly, you want to partition non non integer ontervals. Say you want to select Xt every 1.331 step. Sinc...

13 years ago | 1

| accepted

Answered
Create a string variable with a value same as the name of an imported csv file
regexprep('WW11cRH_29May2012.TXT','_','-') *EDIT* name = 'C:\Program Files\BOSE\Etienne\Data files\WW series_...

13 years ago | 1

| accepted

Answered
function handles
In a *script* define: ns = @(dBcalc,wave,zL) log(10^(dBcalc/10))/((4*pi*zL)/wave) ns(14,765e-9,1e-2) Note the |1e-2...

13 years ago | 1

| accepted

Answered
Reference to non-existent field
I changed several things: function matlabhelp f = figure('Visible','on',... 'MenuBar','none',... 'Unit...

13 years ago | 1

Answered
How do display whole digits of a number in exponent?
text(x,y,sprintf('Q = A^{%.2f}',1.96)) Your question is related to the TEX typesetting functionality embedded in |tetx()|. ...

13 years ago | 2

| accepted

Answered
stuck on a simple cumsum prob
y = 0.5.*(x(3:end) - x(1:end-2)); Is linear interpolation between point 1 and 3, then between 2 and 4 and so on. You ca...

13 years ago | 0

| accepted

Answered
[DISCONTINUED] Wish-list for MATLAB Answer sections.
Editors of the forum should be able to accept answers by *other* contributors on behalf of the OP. This ability should only ...

13 years ago | 0

Answered
merging excel files in another excel
You have to use: # [optional] <http://www.mathworks.co.uk/help/techdoc/ref/ls.html |list = ls()|> to list the |.xlsx| files. ...

13 years ago | 2

| accepted

Answered
matrix
idx = A < 0; nnz( idx) % negative nnz(~idx) % positive (including 0)

13 years ago | 1

| accepted

Answered
how to plot test function graph?
plot(x,dropwavefcn(x))

13 years ago | 0

Answered
Problem with fprintf
Transpose |A| and |B|: fprintf(fid,'%s %d\n',A'); fprintf(fid,'%s %d\n',B'); As I understand, you saved two columns...

13 years ago | 0

Answered
MAtrix
Sum along dimension 2 (columns): sum(A,2)

13 years ago | 0

| accepted

Answered
convert nans to 0
% Sample input with some NaNs A = rand(10); A(randi([1 100],[20,1])) = NaN; % Detect and replace NaNs idx = i...

13 years ago | 0

| accepted

Answered
filling the cells of a column of strings
You don't need a for loop: mdata1(1:39:hhhh*qqqq*uuu,11) = {'01-01-2001'};

13 years ago | 1

| accepted

Answered
How to get the top 5% number and bottom 5% number of a matrix
% Rounded 5% pt = round(10000*0.05); % Sort (each column) and take top and bottom 5% A = sort(A); top5 = ...

13 years ago | 0

| accepted

Answered
Difference between A' and A.'
Matters in complex doamin, compare: * |A' :| <http://www.mathworks.co.uk/help/techdoc/ref/ctranspose.html |ctranpose()|> * ...

13 years ago | 2

| accepted

Answered
Importing from XLSX file, column dates, column data
Keep the dates in double format, then plot then call <http://www.mathworks.co.uk/help/techdoc/ref/datetick.html |datetick()|>

13 years ago | 0

Answered
From vector to matrix
If A is your vector, then: repmat(A,1,100)

13 years ago | 1

| accepted

Answered
Continuous Error bars
You can choose one of the following in the FEX: * http://www.mathworks.com/matlabcentral/fileexchange/27485 * http://www.mat...

13 years ago | 4

Answered
Find euclidean distance of a m X 2 matrix
An alternative: out = hypot(a(:,1)-x(1),a(:,2)-x(2))

13 years ago | 0

Answered
How to concatenate cell array with blank
cs = {'ob' '^b' [] '$b'}; idx = cellfun('isempty',cs); cs = cs(~idx);

13 years ago | 0

| accepted

Answered
Variable step size integration
You know |t|, |htemp|, and |tspan(2)|, then you should preallocate. It will speed up things.

13 years ago | 1

Answered
explaining the output of datevec
The 4th line of |datevec()| syntax is: [Y, M, D, H, MN, S] = datevec(...) Where it's self-explanatory that -1 1...

13 years ago | 0

| accepted

Answered
Compare two strings based on ASCII dictionary order
[trash,idx] = sort({'abc';'a'}) Then just look at |idx(1)|

13 years ago | 1

| accepted

Answered
creating an empty column vector
cell(10,1) Note that you can write to excel into a specific range, i.e. you don't need to add empty cell arrays to skip col...

13 years ago | 0

| accepted

Answered
How I can storage data for arrays
An example with 2 entries (change |n| to increase the number of entries): n = 2 for ii = 1:n Phone(ii).name = ...

13 years ago | 0

| accepted

Load more