Tuesday, February 12, 2008

List of Matlab tutorials and Howtos

Great list of matlab tutorials and howtos.

you can find it here

Saturday, February 9, 2008

function in matlab to convert 1/4-h vectors to 1-h vector

sometime i have to handle with large data vectors, which are time measurements. One value each 15 Min.

For the analysis, i can use 1 value per hour. to convert the vectors i use the following function:


function DATout = convert_15min_1h(DATin)
size_15min=length(DATin);
size_1h=size_15min/4;
DATout=zeros(size_1h,1);
for i=1:1:size_1h
von=(i-1)*4+1;
bis=(i)*4;
DATout(i)=sum(DATin(von:bis))/4;
end

Friday, February 8, 2008

Zeilenabstand in LaTeX

um in LaTeX den Zeilenabstand zu ändern, z.b. von 1,5 auf 1,0 oder sogar 1,25, benutzt man diesen Kommando im prämble:

\renewcommand{\baselinestretch}{1.0}

Tuesday, January 29, 2008

count how many Inf's are in a vector

the following command returns how many Inf's are in a vector

length(find(myVector==Inf))

ckeck if a variable exist

To ckeck if a variable in matlab exist, just use the function exist.

Tuesday, January 8, 2008

Delete sheets without confirmation prompts using VBA in Excel

Hi people,

i was searching for a way to delete a worksheet without confirmation prompt in vba and i found this link.
the code is listed here:


Sub DeleteSheet(strSheetName As String)
' deletes a sheet named strSheetName in the active workbook
Application.DisplayAlerts = False
Sheets(strSheetName).Delete
Application.DisplayAlerts = True
End Sub