C4: linear transforms
C4: linear transforms
A linear transform is always of the form, <x\prime=\alpha_0+\alpha_1x>, where the two constants, <\alpha_0> and <\alpha_1> shift and scale the input coordinates (x) to produce the output coordinates (x\prime). In the case of a temperature-scale transform, the constants take the particular values given in (T1). First, we will define these values, and then use them in the linear transform of temperature scales.
%%% prelim
alpha0=5*459.67/9;
alpha1=5/9;
x=41:55;
p=ones(size(x))/length(x); %fifteen copies of 1/15
%%% compute transformed coordinates
xprime=alpha0+alpha1*x;
%%% plotting
figure; %create blank figure
subplot(2,1,1); %create sub-figure for original plot
stem(x,p,'k-','MarkerFaceColor','k','MarkerSize',11); %plot black (colorcode ‘k’) stems
subplot(2,1,2); %create second sub-figure for transformed plot
stem(xprime,p,'k-','MarkerFaceColor','b','MarkerSize',11); %plot blue stems