Posts

Showing posts from January 21, 2019

Matlab interpolation of 4D scattered data

Image
1 We have a 195x4 (double) matrix: A=[X Y Z temp] , when ploted with scatter3(A(:,1), A(:,2), A(:,3),30, A(:,4), 'filled' ) gives something like this: Now we want to generate a 'cube' colored with the interpolation of the temp=A(:,4) vector data. So far we have tried interp3 % Base Grid [Xm Ym Zm] = meshgrid(A(:,1), A(:,2), A(:,3)); % Grid Refinement [Xq,Yq,Zq] = meshgrid(xmin:dx:xmax, ymin:dy:ymax, zmin:dz:zmax); Aq = interp3(Xm,Ym,Zm,A(:,4),Xq,Yq,Zq); Returns the following error: Error using griddedInterpolant The number of input coordinate arrays does not equal the number of dimensions (NDIMS) of these arrays. Error in interp3 (line 144) F = griddedInterpolant(X, Y, Z, V, method,extrap); Error in PDGEM_MT (line 112) Aq = interp3(Xm,Ym,Zm,A(:,4),Xq,Yq,Zq); S

Exam class: TikZ-circled choices not aligned to hanging indent

Image
4 0 I am typesetting a competition examination paper, and I wanted to satisfy a very specific requirement for the multiple-choice questions: five choices, each with capital letter choice labels all in equal-sized circles with the labels smack in the centres of the circles, and all aligned to the question text hanging indent. It took me a while, but I have thus far combined the (excellent, detailed and clean) solutions in the following threads: Good way to make textcircled numbers? Using circled numbers for answer choices in exam document class How can I draw circled integers with the same size by TikZ? Set indentation of choice in exam documentclass And thus I have the following MWE: documentclass[preview, class=exam,varwidth=true]{standalone} usepackage[T1]{fontenc} usepackage{lmodern} usepackage{tik