erik10

I have a degree in Mathematics and Physics from the Danish University Aarhus, comparable to a masters degree with thesis - majoring in Mathematics. In 1991-92 I was a visting scholar at UCLA, Los Angeles, following graduate courses in Applied Mathematics. Since 1992 I have been a teacher in a high school (gymnasium) in Denmark. Special interests: Applied mathematics, graphics and popularizing Mathematics.

MaplePrimes Activity


These are replies submitted by erik10

@acer Thanks for the valuable input. I didn't know about the possibility of displaying plots proportionally. I tested it and you are right: The document does indeed display plots with a width of 40% - and what is important: It does so when opening the document, no need for reexecution. 

Still it is not enough for the dayly workflow to be sufficient smooth. It requires the user to call the package plots and add the command you mention. Since we recommend our students to place a restart command at the beginning of every new exercise (to avoid interference between exercises), there will be additional work to do, probably leaving the less clever students behind. I am not sure if it will even be sufficient to make it possible to globally set the proportional factor, because you might have plots you want to display at different percentages in the same document ...

What about images, by the way?

Regards,

Erik

@Kitonum 

Absolutely great! I didn't think about the possibility of defining a function, which has a plot as the value. It makes it possible to use the Explore command for this situation too. The code also seems more straight-forward. At the same time I can avoid the oldfashined animate command, which need to generate frames before execution ...

Erik

@DSkoog Exactly! This is what tomleslie apparently can't see. Thank for pointing this out, Daniel. There is no logical reason why it should not be possible to do the same operations inside a Workbook, as it can be done outside. Of course it can be implemented. Here shortly a screenpicture of what I use to do outside any Workbook (neglect my use of a special package Gym):

 

 

I use the menu Tools > Assistants > Import Data. It involves going through a few windows in order to specify what Excel file I am importing and what parts of it, etc. So everything is completely and uniquely specified. So what I am asking for is - as I understand you are recognizing too, Daniel - is to make it possible to access the Data.xlsx file inside the Workbook in the exact same way as it can be done outside. I hope the developers will look into this for the next version of Maple. I know some people prefer a commandline to import data, but why not let it be up to the user?

Erik

 

 

 

 

@tomleslie Thanks, your code works! Although the code is not that bad here at all, I still have the feeling: Why do I have to write these commands, just because I am placing those files inside the Workbook? A step forward and a step backward in my opinion. Hopefully in version 2017 of Maple it will be possible to access the files inside the Workbook via the menus, just as it was without the Workbook! I have to take account of my students too!

Regards,

Erik

@tomleslie Sorry, I will be more specific. I have attached my Workbook_example. It contains an Excel Data filenamed Data.xlsx and the Maple file Exponential fit. Before inserting those two files into the Workbook, I did import data from the Data file into the the file Exponential fit file via the menu: Tools > Assistants > Import Data... as I usually did before version 2016 of Maple. Then I did insert those two files into the Workbook_example file. 

I put the resulting Maple Workbook file in another drive to see if it worked properly. When I opened the file Exponential fit in the workbook and recalculated it using the three !!! in the toolbar, everything seemed to work properly. The file didn't miss the Data file. But then I opened the Data file and changed a count to a big number, saved the file in Excel and afterwards in the Workbook too. So it was saved! Then I opened the Expontiel fit file again and recalculated using !!!. Nothing new happened: It did not take account of the updated Data file.

Then I wonder: Is it another instance of the Data file I have in the Workbook. There seem to be a missing referral to the Datafile somehow. But if that is the case, then how did my first recalculation in the new location work?

I hope someone can help figure this out. I really hope it will not be necessary to use long import commands and Workbook URI to make it work. Using the menues is preferable from my viewpoint ...

 

NB! I needed to save as a zip-file, because Mapleprimes at the moment doesn't allow to upload .maple files!

Workbook_example.zip

Erik

 

 

@acer Thanks for your reply. I now realize the element-wise operator can be used in much more general situations than just multiplication of two lists! Good to know.

What I meant with my second question was if it is possible to solve equations for each item in the list. Lists E and m are given with units. I want a list m with units, which items are the solution to the equation E = 1/2*m*v^2. I know I can isolate m in the equation and use the ~ operator to get the list asked for. It would be nice though, if solve could be applied to each item in the list. NB! Students today aren't that good at manually isolating a variable, so it would be convenient to avoid it, if possible?

Erik

 

@Carl Love Thanks a lot, that solved by problem at hand. I was trying to make many calculations of the same kind at the same time, like in a Excel worksheet. Now for future use, I would like to extend my question.

 

1. question: What if I wanted to make a more general operation on every item in the list, say taking the squareroot of every item in the list, still including units?

 

2. question: Is it even possible making a list of solutions to a certain equation? For example:

E:=[5,12,17]*~Unit(J)

m:=[2,4,6]*~Unit(kg)

and then using the formula E = 1/2*m*v^2 to find a list of velocities, v?

 

Erik

 

@Rouben Rostamian  Thank you a lot for your contribution. I apprciate it. The solution seems very good. I guess then that Least Square is the appropriate method to solve this kind of problem. 

After this succesful solution, let me take the question one step further: Now it might happen that a population is not in Hardy-Weinberg Equilibrium, but still the Least Square method will provide a set of solutions. Let's assume it is decided that the given Phenotype frequencies are subject to some error bounds (it could be absolutely or relative), then is there a way to decide if there are a solution for the allel-frequencies which imply the 'corrected' Phenotype frequencies to be within the bounds mentioned? (and provide the solution)

Erik

 

@jzivku I actually already have contacted support@maplesoft.com, because I didn't get any response from here. I am waiting for an answer at the moment.

Erik

@Preben Alsholm Big thanks! First time I notice this LSSolve command. It works just great! It doesn't matter how many free parameters. Now I only have to consider if I should use it to estimate the elevation, the initial velocity and the Air resistance coefficient or maybe only the latter. By making a combined plot, including the Physical data and the theoretical curve (with "time points" added), I get a very good impression about the quality of the fit!

Erik   

@Carl Love Maybe I was too loose in my description. In fact my discreet data is from an experiment with a throw in physics. Considering the ball to have an air resistance proportional to it's velocity, I want to find a coefficient of air resistance, named k. I wanted to make a fit with the theoretical solution, given initial velocity and elevation. This analytic solution have two coordinates depending on time: x(t) and y(t), assuming the throw taking place in a vertical plane. Obviously the fit can't be done seperately, because I will probably end up with two different optimal values for k! My discreet data consist of a column of times T and two columns of the corresponding x and y values, named X and Y. All data is imported from Excel.

Previously I have done the fitting in a manual way: Importing the X and Y column of data from Excel without any time data, making a combined plot consisting of the scatterplot of (X,Y) and the theoretical curve. Since the problem only involves one free parameter, it is not that difficult to manually find by simple trial and error, until the curve fits the data well. I just wanted to know if it could be done automatically in Maple? Also it would be very helpful in other situations containing more than one parameter! 

NB! The throw could also be modelled with a model in which the force of resistance is proportional to the square of the velocity. This is a different question, because only numerical solutions exixts here ...

Erik

 

@Preben Alsholm Your suggestion worked! I did place an abs around Drag, though, but that amounts to the same. Apparently Maple did try out some negative values of Drag and turned into troubles.

Besides adding output = parametervalues to the fit command did give me the optimal value of Drag.

Thanks a lot!

 

Erik

@Alex Smith You are probably right. Using this multiplikation factor will avoid the need for the lengthy convert command. And besides: the student will learn something!

Erik

A minor correction to the picture:

 

Erik

@Preben Alsholm 

As mentioned it was the person responsible for IT at our school who experienced problems. I will very soon test it myself. We are using Document Mode and 2Dmath. Also I will install Windows 10 from scratch (ISO file). I just need to take backup and clone my harddrive, not to take any chances ...

Erik

3 4 5 6 7 8 9 Last Page 5 of 17