<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
before launching loader.sce, you should have run builder.sce once (for
all).<br>
The following commands should work<br>
<br>
--> cd plotlib021-install<br>
--> exec builder.sce<br>
<br>
then you can issue a <br>
<br>
--> exec loader.sce<br>
<br>
to load the toolbox. If you need to load the plotlib each time you
launch Scilab, <br>
edit your .scilab startup script :<br>
<br>
scipad(SCIHOME+"/.scilab")<br>
<br>
and add the following line therein :<br>
<br>
exec path/plotlib021-install/loade.sce<br>
<br>
(replace "path" with the actual path to "plotlib021-install")<br>
<br>
S.<br>
<br>
<br>
Lester Anderson a écrit :
<blockquote cite="midD47D9F627A2B47528A68645DBB91E8EC@Jennifer"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.6002.18071" name="GENERATOR">
<div><font face="Arial" size="2">Hello Dave</font></div>
<div> </div>
<div><font face="Arial" size="2">Thanks for the pointer on the
toolbox idea. Downloaded and have tried to install/setup on Windows
Vista but can't get it to work. Think it's something to do with the
path. At the moment I extracted the toolbox folder to
C:\users\lester\documents\plotlib021-install I also use Windows XP
but haven't got around to testing on there. I have both version 5.01
and 5.1</font></div>
<div> </div>
<div><font face="Arial" size="2">Tried loading the loader.sce file
into Scilab:</font></div>
<div> </div>
<div><font face="Arial" size="2">Startup execution:<br>
loading initial environment<br>
mclose: Cannot close file whose descriptor is 2: File is not active.<br>
exec('builder.sce',-1)<br>
!--error 241 <br>
File "builder.sce" does not exist or read access denied.</font></div>
<div> </div>
<div><font face="Arial" size="2">at line 11 of exec file called
by : <br>
exec("C:/Users/Lester/Documents/plotlib021-install/loader.sce");<br>
in execstr instruction called by : </font></div>
<div> </div>
<div><font face="Arial" size="2">Given that I am still pretty new
with Scilab, it would be useful to know how the scilab plot commands
could be used to generate the graphic I showed previously.</font></div>
<div> </div>
<div><font face="Arial" size="2">Sorry if this is a basic
question/problem but got to learn by asking :) I'm sure I'm missing
some basic things with regards to the toolbox issue, but I thought they
were pre-built and all you did was run the loader.sce file to get them
into Scilab?</font></div>
<div> </div>
<div><font face="Arial" size="2">Thanks for the assistance in advance.</font></div>
<div> </div>
<div><font face="Arial" size="2">Lester</font></div>
<div> </div>
<div> </div>
<blockquote dir="ltr"
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">-----
Original Message ----- </div>
<div
style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
<a title="dmcomer@dmcmicro.com" href="mailto:dmcomer@dmcmicro.com">dmcomer@dmcmicro.com</a>
</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b>
<a title="users@lists.scilab.org"
href="mailto:users@lists.scilab.org">users@lists.scilab.org</a> </div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b>
Wednesday, September 02, 2009 6:50 PM</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b>
Re: [scilab-Users] Matlab to Scilab conversion</div>
<div><br>
</div>
<div><font color="#0000ff" face="Verdana" size="2">Lester,</font></div>
<div> </div>
<div><font color="#0000ff" size="2">If you do not have the plotlib
toolbox installed, I recommend it. It will handle the semilogx command</font></div>
<div><font color="#0000ff" size="2">without having to convert to
the Scilab plot command. Not that the plot command is bad, just easier</font></div>
<div><font color="#0000ff" size="2">to convert. Post if yo uhave
problems getting plot lib working. I just did this myself. Plotlib can
be found</font></div>
<div><font color="#0000ff" size="2">on the Scilab contributions
site.</font></div>
<div> </div>
<div><font color="#0000ff" size="2">Dave</font></div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"><font
face="Tahoma" size="2">-----Original Message-----<br>
<b>From:</b> Lester Anderson
[<a class="moz-txt-link-freetext" href="mailto:lester@arctica1.wanadoo.co.uk">mailto:lester@arctica1.wanadoo.co.uk</a>]<br>
<b>Sent:</b> Wednesday, September 2, 2009 01:30 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<b>Subject:</b> [scilab-Users] Matlab to Scilab conversion<br>
<br>
</font>
<style></style>
<table id="201179" bgcolor="#ffffff" border="0" height="400"
width="100%">
<tbody>
<tr>
<td valign="top" width="100%">
<div><font face="Arial" size="2">Hello</font></div>
<div> </div>
<div><font face="Arial" size="2">I am fairly new to using
Scilab (and Matlab) but need to convert some existing files. I have
attached an example which I can't get to work and the image of the
correct plot from Matlab.</font></div>
<div> </div>
<div><font face="Arial" size="2">Original Matlab file:</font></div>
<div> </div>
<div><font face="Arial" size="2">rho_m=3300; % in kg/m^3<br>
rho_infill=2700; % in kg/m^3<br>
E=1e11; % in kg/m/s^2<br>
v=0.25;<br>
g=9.81; % in m/s^2<br>
l1=1e3:2e3:50e3; % in m<br>
l2=75e3:25e3:1000e3; % in m<br>
l=[l1 l2]; % in m<br>
k=1./l; % in 1/m</font></div>
<div> </div>
<div><font face="Arial" size="2">for Te=0:10e3:100e3 %
in m<br>
D=E*Te^3/(12*(1-v^2));<br>
phi=1./((D.*k.^4./((rho_m-rho_infill)*g))+1);<br>
semilogx(k,phi)<br>
hold on<br>
title('\Phi _e(k) for various T_e')<br>
xlabel('Wavenumber k')<br>
ylabel('\Phi _e(k)')<br>
end<br>
text(1.7e-6,0.5,'T_e=100km')<br>
text(3.6e-5,0.5,'T_e=10km')<br>
text(8e-5,0.95,'T_e=0km')</font></div>
<div> </div>
<div><font face="Arial" size="2">Output from the conversion
below:</font></div>
<div> </div>
<div><font face="Arial" size="2">// Display mode<br>
mode(0);</font></div>
<div> </div>
<div><font face="Arial" size="2">// Display warning for
floating point exception<br>
ieee(1);</font></div>
<div> </div>
<div><font face="Arial" size="2">rho_m = 3300;<br>
// in kg/m^3<br>
rho_infill = 2700;<br>
// in kg/m^3<br>
E = 100000000000;<br>
// in kg/m/s^2<br>
v = 0.25;<br>
g = 9.81;<br>
// in m/s^2<br>
l1 = 1000:2000:50000;<br>
// in m<br>
l2 = 75000:25000:1000000;<br>
// in m<br>
l = [l1,l2];<br>
// in m<br>
k = 1 ./l;<br>
// in 1/m</font></div>
<div> </div>
<div><font face="Arial" size="2">for Te = 0:10000:100000<br>
// in m<br>
D = (E*(Te^3))/(12*(1-v^2));<br>
phi = 1 ./((D .*(k .^4)) ./((rho_m-rho_infill)*g)+1);<br>
// !! L.14: Matlab function semilogx not yet converted, original
calling sequence used.<br>
semilogx(k,phi)<br>
set(gca(),"auto_clear","off")<br>
title("\Phi _e(k) for various T_e")<br>
xlabel("Wavenumber k")<br>
ylabel("\Phi _e(k)")<br>
end;<br>
// !! L.20: Matlab function text not yet converted, original calling
sequence used.<br>
text(0.0000017,0.5,"T_e=100km")<br>
// !! L.21: Matlab function text not yet converted, original calling
sequence used.<br>
text(0.000036,0.5,"T_e=10km")<br>
// !! L.22: Matlab function text not yet converted, original calling
sequence used.<br>
text(0.00008,0.95,"T_e=0km")</font></div>
<div> </div>
<div><font face="Arial" size="2">Hopefully someone can see
what is needed to get things working. Thanks in advance all.</font></div>
<div> </div>
<div><font face="Arial" size="2">Lester Anderson</font></div>
</td>
</tr>
</tbody>
</table>
</blockquote>
</blockquote>
</blockquote>
<br>
</body>
</html>