Answered
Activex google earth plugin and matlab
* A useful function: http://www.mathworks.com/matlabcentral/fileexchange/20031-google-earth-com-api-example/content/GEserver.m ...

14 years ago | 0

Answered
logical Indexing
idx = a(:,2) > 1; a = a(idx,:) with a(idx) - note no ,: - you're saying to take the *elements* indexed by idx. with a(id...

14 years ago | 0

| accepted

Answered
Set Ydata in Matlab, how does it work?
I think it's a real time update (since it ivolves a daq object) of your plot. A general example is: h = plot(rand(10,1...

14 years ago | 1

| accepted

Answered
loading a large excel file to Matlab
16 400 * 6000 * (8 bytes) = 750.732422 megabytes If you're in windows import the excel in blocks by specifying the _range_ wi...

14 years ago | 0

Question


Select neighbours of a vector efficiently
a = 1:10; k = 4; I have to loop through the elements of *_a_* and pick the *_k_* - 4 - neighbors equally distributed to eac...

14 years ago | 4 answers | 1

4

answers

Answered
candle function problem
str = urlread('http://ichart.finance.yahoo.com/table.csv?s=GOOG&d=6&e=21&f=2011&g=d&a=7&b=19&c=2004&ignore=.csv'); [O,H,L,C]...

14 years ago | 0

Answered
Saving tightly cropped PDFs in Matlab
Make the axes slighly bigger: *Edit* % Create a figure measure in pixels positioned at 360 (from left) 150 (from bottom), 560 ...

14 years ago | 1

| accepted

Answered
adding gaussian white noise to data
doc randn or online http://www.mathworks.com/help/techdoc/ref/randn.html

14 years ago | 0

| accepted

Answered
XOR operation
xor(I(1:2:end), I(2:2:end))

14 years ago | 0

| accepted

Answered
Calculating cross-point within a set of x & y data
http://www.mathworks.com/matlabcentral/fileexchange/11837-fast-and-robust-curve-intersections http://www.mathworks.com/matlab...

14 years ago | 0

Answered
arrays in functions
c = -1/atanh((exp(a*2*pi)-cosh(a*b*Actual_Output))./sinh(a*b*Actual_Output)); Actual_Output(2:end)-Actual_Output(1:end-1)...

14 years ago | 0

Answered
area, stairs
% Random row input x = 1:10; y = rand(1,10); % Normal area chart subplot(3,1,1) area(x,y) % Stairs chart...

14 years ago | 7

| accepted

Answered
refreshdata loop issues
Drop: set(h,'XDataSource','a','YDataSource','b'); and use in the loop: set(h,'xdata',O(:,1,ii),'Ydata',O(:,2,ii)) note...

14 years ago | 0

Question


Programmatically calculate position for textbox (annotation)
I have been adding textbox annotations manually with an error and trial approach. First I place the annotation and check wethe...

14 years ago | 2 answers | 1

2

answers

Answered
Identifying gaps in time-series data
*EDIT per Fangjun's suggestion* % Suppose input is (two gaps over the threshold) neptune.time = datenum({'20110222T180326.76...

14 years ago | 2

| accepted

Answered
Finding titles in a notepad file
Import with textscan and use strcmpi fid = fopen('test.txt'); out = textscan(fid,'%27s - %s','Delimiter','','CollectOutpu...

14 years ago | 0

| accepted

Answered
Extract text data and time data from notepad file
fid = fopen('test.txt'); out = textscan(fid,'%f/%f/%f - %f:%f:%f - %s','Delimiter','','CollectOutput',1); time = datenum...

14 years ago | 0

Answered
Plotting on probability paper
N = 1:50; Pd = [ 0.000383300630824923 0.00304135866412469 0.0115018297345039 0.0299724820999226 0.0620021866776590 0.1093938...

14 years ago | 0

Answered
Anonymous functions with 2 ou more outputs?
[f,g] = @(x) x+1 ??? Error: Only functions can return multiple values. If you post some code we could try to find a differ...

14 years ago | 0

Answered
Need help tracking down this bug
Use <http://www.mathworks.com/help/techdoc/matlab_prog/f10-60570.html debugging>

14 years ago | 0

Answered
Regression Diagnostics
* <http://www.mathworks.com/help/toolbox/stats/bq_w_hm.html Statistics toolbox> * <http://www.mathworks.com/help/toolbox/econ/f9...

14 years ago | 0

| accepted

Answered
Displaying information about the data set by clicking on its plot
% Example figure with 3 datasets, assign _tag_ property when plotting: colors = jet(3); x = (1:100).'; y = sin(x)*ran...

14 years ago | 3

| accepted

Question


Color palette for financial graphs (price index, returns, distributions etc...)
I need the RGB values of a color palette with *red, green, blue* and maybe some others to draw financial charts. I like the exc...

14 years ago | 1 answer | 0

1

answer

Answered
matrix manipulation, maybe repmat?
Dynamic version of the solution proposed by proecsm: n = 2; idx = repmat(1:size(a,1),n,1); b = a(idx(:),:) or ...

14 years ago | 4

| accepted

Answered
Can this for loop be made into array operations?
T * V http://en.wikipedia.org/wiki/Matrix_multiplication

14 years ago | 2

| accepted

Answered
count number of values between NaN
In = [NaN; NaN; NaN; NaN; 1; 1; 1; 1; NaN; NaN; NaN; 1; NaN; NaN; NaN; NaN; NaN; NaN; NaN; 1; NaN; NaN; NaN; NaN]; [a,b] ...

14 years ago | 0

| accepted

Answered
Regular expression help for capturing tokens from a c++ if_else function block
tokens = regexp(s,'if\ ([\(\)\w\ \.><=&]+)\s+{','tokens')

14 years ago | 1

Answered
How to scan an array for outlying data and replace it with the average of the good data points surroundingi t
B = rand(30,1); B(10:11) = 100; % Find values outside 3 standard deviations m = mean(B); s = std(B); idx = B < m - ...

14 years ago | 0

Answered
SOS: xlswrite with cell array
[status,msg] = xlswrite('myFile.xlsx',R1000_Co_ticker(1:135,1),'Russell 1000','D4:D138'); _myFile.xlsx_ will be created in th...

14 years ago | 1

| accepted

Answered
How to apply "smart indent" to a file programmatically
*EDIT Dec 2015*: use http://www.mathworks.com/matlabcentral/fileexchange/50554-okomarov-tidycode Suppose you have this fcn s...

14 years ago | 9

| accepted

Load more