Rank: 3052 based on 12 downloads (last 30 days) and 4 files submitted
photo

Thomas Clark

E-mail
Company/University
University Of Cambridge
Lat/Long
52.198067, 0.11948

Personal Profile:

I'm a fluid dynamicist, currently finishing off my PhD at Cambridge University Engineering Department, UK. My specialist subject is turbulent structures in Boundary layers.

I do part time consultancy work covering tidal stream turbine design, general marine propeller/turbine design, experimental techniques (Particle Image Velocimetry and related) and design optimisation. I like to use MATLAB for most of my work!
Please feel free to contact me if you'd be interested in corresponding, or require a consultant for tasks similar to the above.

In my spare time, I walk, sail, go climbing, paint with watercolours (abstract and landscapes) and play electric guitar. At least, I would do all those things, if I wasn't using Matlab most of the time...

Professional Interests:
Fluid dynamics, Tidal Turbines, Marine Engineering, Propeller / Turbine Design, Design Optimisation

 

Watch this Author's files

 

Files Posted by Thomas View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
18 Sep 2010 Screenshot raiseFigure - Intuitive alternative to figure(h) command Identifies figures by Title (or tag), not by figure number Author: Thomas Clark handle, tag, figure, name, title 2 0
16 Sep 2009 Default_Path_Retrieval Save and retrieve last-used path strings. Ideal for users of uigetfile() and similar functions. Author: Thomas Clark uigetfile, uigetdir, uiputfile, path handling, path, default path 3 0
25 Jun 2009 Screenshot FORTRAN_Mex_Highlighter Improvement of syntax highlighting for FORTRAN MEX files (using an external editor like GEDIT) Author: Thomas Clark gedit, fortran, mex, syntax, highlighting, editor 3 0
25 Aug 2005 Screenshot OceanMap Manually enter matrix elements in a GUI, then save to a *.MAT file. Author: Thomas Clark matrices, flexible array editor, flexarray, matrix, gui, submersible 4 9
  • 4.83333
4.8 | 6 ratings
Comments and Ratings by Thomas View all
Updated File Comments Rating
13 Jan 2012 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin

Very useful, a good utility function which saves some though when implementing MC models.

13 Jan 2012 monte carlo simulation /estimation probilistic experiment game of chance Author: WASEEM SHAHID

No documentation, description or comments. No transferable functionality. Poor quality (slow) code.

Completely useless

22 Dec 2011 splitFV - split a mesh Splits a 2D or 3D mesh defined by faces and vertices into separately connected mesh pieces. Author: Sven

This did exactly what I wanted, straight out of the box, without editing a single line of code.

That's my kind of FEX submission!

NB For users wondering about this, it works in 3D too.

Sven, would you like some JPEGs of it decomposing different vortices in a fluid flow?

21 Dec 2011 der.m v1.0 (Nov, 2009) Estimates first derivative of an array by using POLYFIT locally on each point ignoring NaNs! Author: Carlos Adrian Vargas Aguilera

*** Amendment

Sorry, I cut and pasted the wrong code above.

Code to produce error is:

F = rand(14,14,14);
h = [1 1 1];
Wn = 11;
Deg = 3;
Pad = 'replicate';
[dF1,dF1std] = der(F,h(1),Wn*h(1),Deg,Pad,1);

??? Error using ==> vertcat
CAT arguments dimensions are not consistent.

Error in ==> der at 304
T = [interp1((1:2)',T(1:2,:) ,repmat((-W2+1:0)' ,1,n),[],'extrap'); T;

Error in ==> tryDer at 45
[dF1,dF1std] = der(F,h(1),Wn*h(1),Deg,Pad,1);

Kind regards

Tom

21 Dec 2011 der.m v1.0 (Nov, 2009) Estimates first derivative of an array by using POLYFIT locally on each point ignoring NaNs! Author: Carlos Adrian Vargas Aguilera

Hi Carlos,

This is potentially awesome!

However, I've got two concerns:

1. There may be a bug for some inputs. I tried to get derivative (in the columnar direction) of a lot of vectors in a 3D array, and get:
F = rand(10,10,10);
h = [1 1 1];
Wn = 9;
Deg = 2;
Pad = 'replicate';
[dF1,dF1std] = der(F,h,Wn*h(1),Deg,Pad,1);

??? Error using ==> reshape
To RESHAPE the number of elements must not change.
Error in ==> polyGradient>der at 245
  T = reshape(permute(DT,[DIM 1:DIM-1 DIM+1:Ndim]),m,n);

2. The mlint code analyser highlights a possibly ill-conditioned use of inv( ) at line 365. Is it justified, or is in not possible to use \ for this computation?

Thanks so far, it's looking like this will be very useful, even if only limited to 1D.

Kind regards

Tom

Comments and Ratings on Thomas' Files View all
Updated File Comment by Comments Rating
02 Dec 2008 OceanMap Manually enter matrix elements in a GUI, then save to a *.MAT file. Author: Thomas Clark Giaccari, Luigi

That'is it Ifound
Mister clark there is nothing wrong in my pc, maybe you should
turn the profile off when you run a new test try this. Especially
before giving low and inappropriate rating.
 
%% PUT THIS IN A SCRIPT AND RUN IT
% profile on
% profile clear
 
%%%%%%%%%%%%%%%%%%%%%%%%
 
%Maybe you forgot this !!!!
 
profile off
 
profile off
 
profile off
 
profile off
 
%%%%%%%%%%%%%%%%%%%%%%%
 
Npoints = logspace(1,6,15);
lengthN = numel(Npoints);
convhull_times = zeros(lengthN,1);
chull2d_times = zeros(lengthN,1);
for i = 1:lengthN
    N=ceil(Npoints(i));
    x=rand(N,1);
    y=rand(N,1);
    tic
    chull1 = convhull(x,y);
    convhull_times(i) = toc;
    tic
    chull=ConvHull2D(x,y);
    chull2d_times(i) = toc;
end
      
figure()
semilogx(Npoints,convhull_times,'g-')
hold on
semilogx(Npoints,chull2d_times,'b-')
legend({'Native convhull';'convhull2d'})
title('Performance comparison')
% profile viewer

05 Oct 2007 OceanMap Manually enter matrix elements in a GUI, then save to a *.MAT file. Author: Thomas Clark Clark, Tom

Michele,

ActiveX objects do not (usually) have a visibility property. Nor can they be embedded in an uipanel (which of course may be hidden along with it's contents).

The only way to hide activeX objects (that I know of) is to move them:
>move(handle,[x y wdth ht]);
check out the help on move for more info. Don't forget to save the original position so you can move it back!

---
Kind Regards

Tom

26 Jul 2007 OceanMap Manually enter matrix elements in a GUI, then save to a *.MAT file. Author: Thomas Clark Micheli, Michele

Thank you!

just a question: is it possible to Hide/unHide the FlexGrid control?

09 Jul 2007 OceanMap Manually enter matrix elements in a GUI, then save to a *.MAT file. Author: Thomas Clark Perlovskiy, Eugene

Thank's for good example.
However, I don't know how use the ColWidth property of flexArray. I want to exchange a column width in flexArray. Can you help me?

03 Apr 2007 OceanMap Manually enter matrix elements in a GUI, then save to a *.MAT file. Author: Thomas Clark asti, gustavi

finally something usefull

Top Tags Applied by Thomas
1d, 2d, 3d, boundary condition, boundary conditions
Files Tagged by Thomas View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
01 Aug 2011 Screenshot Laplacian in 1D, 2D, or 3D Sparse (1-3)D Laplacian on a rectangular grid with exact eigenpairs. Author: Andrew Knyazev 2d, 3d, laplacian, poisson, pde, boundary condition 53 1
  • 5.0
5.0 | 2 ratings
18 Sep 2010 Screenshot raiseFigure - Intuitive alternative to figure(h) command Identifies figures by Title (or tag), not by figure number Author: Thomas Clark handle, tag, figure, name, title 2 0
16 Sep 2009 Default_Path_Retrieval Save and retrieve last-used path strings. Ideal for users of uigetfile() and similar functions. Author: Thomas Clark uigetfile, uigetdir, uiputfile, path handling, path, default path 3 0
25 Jun 2009 Screenshot FORTRAN_Mex_Highlighter Improvement of syntax highlighting for FORTRAN MEX files (using an external editor like GEDIT) Author: Thomas Clark gedit, fortran, mex, syntax, highlighting, editor 3 0
02 Jun 2009 Screenshot Patch Normals Calculates the normal vectors of a triangulated mesh (patch) Author: Dirk-Jan Kroon patch, isosurface, normals, normal vector, faces, vertices 26 4
  • 5.0
5.0 | 2 ratings

Contact us at files@mathworks.com