include - include() function allow you to include simple definitions from other documents. - Messages
QuoteIn ~ 125000 exchanges Mathsoft Collaboratory I bet < 12 work sheets were exchanged with reference to other work sheet. It might be useful in Smath from prime consideration but in fact it is limited to specific functions, some type of program that would be cumbersome otherwise ... but the collapsed area is a much better approach as it keeps the document stand alone
Could you rephrase or elaborate on this. I'm curious to know what you mean here.
Can the include function, include variables / functions from the following (my result in parenthesis):
1. Variables defined by a Combobox List (NO)
2. Variables defined within an area (Yes)
3. Variables defined in an area within an area (or within multiple areas) (NO)
4. Functions - Same rules as Variables
5. Variables defined by variables that are not transferable. Meaning that if you have X=2*Y and Y is inside of an area which is inside of another area then X will not be defined in you sheet which is trying to include the variable X. (NO)
6. Variables defined by functions that are not transferable. Meaning that if you have f(X,Y)=x*y this function is inside of an area which is inside of another area then any variables defined by the function f(X,Y) will not be defined in the sheet which is trying to include those variables. (NO)
In my opinion, I like this except for #1 (seems odd). This provides some control of variables. Additionally I think that all functions can be in their own areas, so they can be collapsed (ideally all functions would be located at the top of the page in each of their respective areas).
Thanks again for this Function!
Let me know your thoughts on updating the Combobox List.
Quote:
In ~ 125000 exchanges Mathsoft Collaboratory I bet < 12 work sheets were exchanged with reference to other work sheet. It might be useful in Smath from prime consideration but in fact it is limited to specific functions, some type of program that would be cumbersome otherwise ... but the collapsed area is a much better approach as it keeps the document stand alone
Could you rephrase or elaborate on this. I'm curious to know what you mean here.
_______________________________________
include("string" ) - include sm-file .... as it looks: same as Mathcad/Mathsoft "reference"
i.e: reference to a work sheet that contains the program to be used elsewhere in any work sheet.
In all my visits to this forum, I have no recollection collabs posting a long valid work sheet
doing something useful in reference to a master "include'.
Mathcad/Mathsoft distributed many e-books, some with very few "reference"
One of them was so gigantic "Creating Amazing Images" that the bright Norvegian made it OTHERWISE
His 15 MB e-book is all in "globally defined mode". So, any specific work sheet [project] is also
globally defined ... works magic. Smath does not have the global definition. Sometimes I wish Smath
have global definition. So, you can define parameters at the point of use, past the function
definition. The way around is to include the parameters in the function definiion itself.
Having it: I would use occasionaly, I don't have: fine [not worth a cry].
You mention "Combobox". What could that be ? In 15 years of intensive forums [Process Control
and Instrumentation, Mathematica, Math forum, OriginLab, Mathsoft, now Smath] ... I don't even
imagine what "Combobox" would do for me because what that is ?
The Smath "compactor" enables to collect plotting arguments [I have not used more than 8]
The real limit ? Don't kow.
Using Smath correctly is the key. When you have problem: attach your work sheet,
Many collab will doctor your project. Your function f(x,y):= somtehing ... has no plotting interest
It must have parameters . Smath Maxima X_Y plot is gorgeous on that for plotting contours,
as many as you wish. This fall, I posted "Doublet" a great piece of work based on the "compactor".
What was your question/problem ?
An area within an area is like the pigeon pregant of the mouse, the mouse pregnant of the elephant.
Jean
First let me say, I love your enthusiasm and your metaphor/comparisons.
I will try to address some of your questions:
Combobox is a plugin which allows the use of a 'drop down' selection box inside the work sheet.
As far as using 'include' goes - I like the idea of connecting calculations that are part of a project. For example in one work sheet you define gravity loads in another you define lateral loads. Then you have a steel beam design file where you include the two 'load' files you previously created. This way if you change the loads, everything is 'automatically' updated.
I apologize for my poor use of an example function. I was just trying to demonstrate when 'include' actually includes something and when it does not. I will have to check out the Doublet.
So my question/problem is really just being able to use the combobox with the include function and trying to provide some information to others that are using include based on what I have found.
Thanks for the reply Jean
Thanks!
WroteUni - is it possible for include() to allow the use of the combobox region?
No, it is impossible. As I explained before, include() can use only static content (definitions), because it based on store.AddDefinition() method which can't load visual plugins. These data must be loaded by another way (Worksheet object). It is more complicated and Andrey can't do it now. In other words, for the full inclusion of other files need to significantly alter the function. And I'm not sure that I will succeed to do this.
As you can see from some of the other threads I do think include() is very useful for any real project application.
On the place holder, I can plug the program bar, extend down
plug some functions f(x):= ln(x) ....
When getting out the CombBox: it crashes Smath ... repeatdidly.
Cheers, Jean
Open/Open/Open ... combo => crash/crash/crash.
What to do: nothing but go to hell and go to bed.
Jean
WroteI'm trying to understand the "rules" of include.
Can the include function, include variables / functions from the following (my result in parenthesis):
1. Variables defined by a Combobox List (NO)
2. Variables defined within an area (Yes)
3. Variables defined in an area within an area (or within multiple areas) (NO)
4. Functions - Same rules as Variables
5. Variables defined by variables that are not transferable. Meaning that if you have X=2*Y and Y is inside of an area which is inside of another area then X will not be defined in you sheet which is trying to include the variable X. (NO)
6. Variables defined by functions that are not transferable. Meaning that if you have f(X,Y)=x*y this function is inside of an area which is inside of another area then any variables defined by the function f(X,Y) will not be defined in the sheet which is trying to include those variables. (NO)
Try now.
Include" does not work either. What is "combobox " for ?
Let test you pretention outside of "combobox": download both work sheets.
The work sheet "Genfit Algo Include" is the progrmmed algorithm that
I would like to be live in the work sheet "Genfit Algo Include Test".
There is nothing to do, just wait until you get a plot [~ 1 second].
The error message says "file not found" ... "include" does not fetche
the algorithm computation from the referenced file, even if the referenced
algo is open in a separate Smath instance.
It would be useful to me, simplifying the data modeling.
Jean
Genfit Algo Include.sm (13 KiB) downloaded 91 time(s).
Genfit Algo Include Test.sm (17 KiB) downloaded 83 time(s).
WroteLet test you pretention outside of "combobox": download both work sheets.
The work sheet "Genfit Algo Include" is the progrmmed algorithm that
I would like to be live in the work sheet "Genfit Algo Include Test".
There is nothing to do, just wait until you get a plot [~ 1 second].
The error message says "file not found" ... "include" does not fetche
the algorithm computation from the referenced file, even if the referenced
algo is open in a separate Smath instance.
Don't forget the file's extension: "path\to\file.sm"
Genfit Algo Include Test.sm (17 KiB) downloaded 95 time(s).
Elid: try again
Jean
I have the equal sign. It's in Mikes updated sheet. The Beta in the screen shot I took shows 4; whereas Uni's PDF shows a 4x1 matrix (array)
.WroteJean,
I have the equal sign.It's in Mikes updated sheet.The Beta in the screen shot I took shows 4; whereas Uni's PDF shows a 4x1 matrix (array)
You may have to put both work sheets in your Smath working directory.
If you read 4, instead of 1: it does not find the work sheet in question.
If it does not work: the problem is specific to your instalation.
After the wife and the kids, consider re-installing Smath.
Jean
-
New Posts
-
No New Posts