kill(all)$

maxima:Construct Txy diagram Chloroform & hexane (= Mixture),version 1.0,part 1
peter.vlasschaert@gmail.com,29/08/2020

load packages ,option
=================

load(lrats)$ ratprint:false$

ref :linspace
==========

see : concept ' linspace' ,definition
------------------------------------------------

website : Control
=============
→ new: 07/01/2020:appendix : def linspace : values between  tb[1] & tb[2], nv = number of points.

linspace1(ii,xmin,xmax,nv):= block(
xmin+(ii-1)/(nv-1)*(xmax-xmin))$

optimized code :
----------------------

grind(linspace1)$

same matlab :linspacef ,' see:below '

ref :https://math.boisestate.edu/~calhoun/teaching/matlab-tutorials/lab_31/html/lab_31.html

makelist(linspace1(i,0,1,11),i,1,11);;

linspacef(xmi,xma,nv):= block(
[r,ii],
r:xmi+(ii-1)/(nv-1)*(xma-xmi),
return( float(makelist(ev(r),ii,1,nv)))
)$

optimized code :
----------------------

grind(linspacef)$

linspace(xmi,xma,nv):= block(
[r,ii],
r:xmi+(ii-1)/(nv-1)*(xma-xmi),
return( makelist(ev(r),ii,1,nv))
)$

optimized code :
----------------------

grind(linspace)$

analog : matlab, 'numeric'      → "linspacef"

v1:linspacef(0,1,11);

v1a:length(v1);

linspace : maxima ,'symbolic' → "linspace"

v2:linspace(0,1,11);

v2a:length(v2);

w1:[0,0.002,0.004,0.006,0.008,0.01,0.015];
w1a:length(w1);
w2:linspacef(.02,.92,46);
w2a:length(w2);
w3:[0.93,.94,.95,.96,.97,.98,.985,.990,.995,1];
w3a:length(w3);

w:flatten([w1,w2,w3]);

wa:length(w);

construct  combspace 
=================

combspace(z1):=block([q:[],i],
r1:length(z1),
 for i:1 thru r1 do
    (
     q:endcons(z1[i],q)    
    ),  
    flatten(q)
)$

optimized code :
----------------------

grind(combspace)$

zz:combspace([w1,w2,w3]);

zza:length(zz);

  use :combspace ( = my function for combination of space (= list with values))
============================================================

→   very important to show graph : where small part of domain change very fast.