Items tagged with embedded-components

Feed

When I use functions from the DocumentTools to display information in a Maple document, they display a weird bracked along the left hand side of the display. I would like them to display in the same way they do in the help pages. I have attached a document showing the results I get when I repeat some of the examples from the help pages.

display-problems.mw

 

With this application you will learn the beginning of the study of the vectors. Graphing it in a vector space from the plane to the space. You can calculate its fundamental characteristics as triangle laws, projections and strength. App made entirely in Maple for engineering students so they can develop their exercises and save time. It is recommended to first use the native syntax then the embedded components. In Spanish.

Vector_space_with_projections_and_forces_UPDATED.mw

Movie #01

https://www.youtube.com/watch?v=VAukLwx_FwY

Movie #02

https://www.youtube.com/watch?v=sIxBm_GN_h0

Movie #03

https://www.youtube.com/watch?v=LOZNaPN5TG8

Lenin Araujo Castillo

Ambassador of Maple

Download New_ReportGeneration_with_ExcelData.mw

Dear Users,

I have received a congratulations from a Mapleprime user for my post (on Finite Element Analysis - Basics) posted two years earlier. I  did not touch that subject for two years for obvious reasons. Now that a motivation has come, I have decided to post my second application using embedded components. This I was working for the past two years and with the support from Maplesoft technical support team and Dr.RobertLopez. I thank them here for this workbook has come out well to my satisfaction and has given me confidence to post it public.

About the workbook

I have tried to improve the performance of a 2-Stroke gasoline engine to match that of a four stroke engine by using exhaust gas recirculation. Orifice concept is new and by changing the orifice diameter and varying the % of EGR, performance was monitored and data stored in Excel workbook. These data can be imported to Maple workbook by you as you want for each performance characteristic. The data are only my experimental and not authentic for any commercial use.

This Maple workbook generates curves from data for various experiments conducted by modifying the field variables namely Orifice diameter, % Exhaust gas Recirculation and Heat Exchanger Cooling. Hence optimum design selection is possible for best performance.

Thanks for commenting, congratulating or critisising!! All for my learning and improving my Maple understanding!! 

I am importing an excel worksheet xlsx file in to a datafile. Though the formatting in excel is perfect with 3 decimals, the data table stores many values in 14 decimals. How do I convert? What is the command? Can any one help me.

I enclose the doc and excel file for reference and use. I tried in many ways, but failed to convert.MP1_Data.xlsxDoubt_NumberFormat_in_DataTable.mw
 

NULL

 

``

27.90

(1)

BTE := evalf(2.3)*Import("E:/A_PhD2017/MP1_Data.xlsx", "Brake_Thermal_Efficiency")

``

``


 

Download Doubt_NumberFormat_in_DataTable.mw

 

I want to obtain a report in a particular table format in TextArea component.REPORT (TextArea)area and ComboBox are not visble here.

Can any one help me? TextBox_Format_Output_Request.mw
 

restart

z := "Maple1"; x := "Map"; y := "Maple2"; x1 := 9.080787; y1 := 9.98765; z1 := 8.090909

I have done it using the print format directly with variable values. This is fine for me.

Maple:        Maple:     Map

  9.9876:   9.0808       8.1

 

I have done it differently defining a variable for the print format. This is fine for me and required as standard.

y3 := "%-2.5s:        %2.5s:     %2.5s\n  %-2.5g:   %-2.5g       %-3.2g\n", z, y, x, y1, x1, z1

printf(y3)

Maple:        Maple:     Map
  9.9876:   9.0808       8.1

 

 

Now I want these two lines as per format print  inside textarea0 named REPORT.

``

                                 

 

SetProperty("REPORT", Value, "")``

 

 

``

 

 

``


 

Download TextBox_Format_Output_Request.mw

I attach the doc for clarity of my odoubt. I have made all the required compoennets commands except for the formatting of printf formaat. Thanks for help.

Ramakrishnan V

mathcontainerUses_Doubt.mw
 

restart; d[1] := [2.36, 26.90], [2.75, 30.0], [3.14, 31.9], [3.53, 32.8], [3.93, 33.4], [4.32, 32.8], [4.71, 31.9]

[2.36, 26.90], [2.75, 30.0], [3.14, 31.9], [3.53, 32.8], [3.93, 33.4], [4.32, 32.8], [4.71, 31.9]

(1)

NULL

d[2] := [2.36, 32.40], [2.75, 34.90], [3.14, 36.90], [3.53, 38.00], [3.93, 38.40], [4.32, 37.8], [4.71, 36.5]

[2.36, 32.40], [2.75, 34.90], [3.14, 36.90], [3.53, 38.00], [3.93, 38.40], [4.32, 37.8], [4.71, 36.5]

(2)

d[3] := [2.36, 27.9], [2.75, 28.3], [3.14, 30.0], [3.53, 30.9], [3.93, 31.3], [4.32, 30.8], [4.71, 29.7]

[2.36, 27.9], [2.75, 28.3], [3.14, 30.0], [3.53, 30.9], [3.93, 31.3], [4.32, 30.8], [4.71, 29.7]

(3)

y := a*x^2+b*x+c; for i to 3 do d[i] := [d[i]]; c[i] := CurveFitting[LeastSquares](d[i], x, curve = y) end do

HFloat(8.047886108501745)+HFloat(11.793324911833839)*x-HFloat(1.5172878997894277)*x^2

(4)

 

curve1 := [c[1], c[2]]; k[1] := [1, 2]; curve1p := [d[1], d[2]]; l[1] := "plot 1"

"plot 1"

(5)

curve2 := [c[2], c[3]]; k[2] := [2, 3]; curve2p := [d[2], d[3]]; l[2] := "plot 2"

"plot 2"

(6)

curve3 := [c[1], c[3]]; k[3] := [1, 3]; curve3p := [d[1], d[3]]; l[3] := "plot 3"

"plot 3"

(7)
Table 1

 

xlabel := "Brake Power"; ylabel := "Efficiency"

"Efficiency"

(8)

p1 := plot(curve1, x = 2.0 .. 5.0, labels = [xlabel, ylabel], labeldirections = ["horizontal", "vertical"], color = [black], linestyle = [1, 2], thickness = [3, 1], title = Title, caption = "Fig. 1 cool  Example 1", legend = ["curve1", "curve2"]); p2 := plot(curve1p, style = point, color = [black], symbol = [soliddiamond, box], symbolsize = 10); plots:-display(p1, p2)

 

p1 := plot(curve2, x = 2.0 .. 5.0, labels = [xlabel, ylabel], labeldirections = ["horizontal", "vertical"], color = [black], linestyle = [1, 2], thickness = [3, 1], title = Title, caption = "Fig. 1 cool  Example 1", legend = ["curve1", "curve2"]); p2 := plot(curve2p, style = point, color = [black], symbol = [box, point], symbolsize = 10); plots:-display(p1, p2)

 

p1 := plot(curve3, x = 2.0 .. 5.0, labels = [xlabel, ylabel], labeldirections = ["horizontal", "vertical"], color = [black], linestyle = [1, 2], thickness = [3, 1], title = Title, caption = "Fig. 1 cool  Example 1", legend = ["curve1", "curve2"]); p2 := plot(curve3p, style = point, color = [black], symbol = [soliddiamond, point], symbolsize = 10); plots:-display(p1, p2)

 

 

"for j from 1 to 3 do  print( Report on l[j]); for i in k[j] do x1(i):=solve((ⅆ)/(ⅆ x)c[i]);  y1(i):=eval( c[i], [x = x1(i)]):  print( Maximum brake thermal efficiency of,y1(i) "%"occurs at brake power value of , x1(i)kW);  end do;  end do;"

Maximum*brake*thermal*efficiency*of, HFloat(30.964188366461613)*"%"*occurs*at*brake*power*value*of, 3.886317459*kW

(9)

NULL


 

Download mathcontainerUses_Doubt.mw

Can any one state the uses of mathcontainer?

1. It can store only one algebraic expression at a time?

2. Can it handle list of algebraic expressions?

3. Can it store list data points (x,y) for a list of curves?

4. Can there be any use for click to edit this component?

More than a simple Yes or No a simple example for each yes answer would be very helpful.

I enclose a document with list of coordinates for for three curves, expression for curve fitting, three expressions derived for these plot points (coordinates), a command for optimum y for each of the three curves (maximum y and corresponding x value), 

Thanks for answering.

Ramakrishnan V

Can any one help me with an example of how to use module in embedded components where a (action:-
 

 

action := module () export arithmatic, times;  arithmatic := proc (a, b) options operator, arrow; a+b end proc; arithmatic := proc (a, b) options operator, arrow; a-b end proc; times := proc (a, b) options operator, arrow; `mod`(a*b, 5) end proc end module

_m1580648227872

(1)

action:-arithmatic(2, 5)

-3

(2)

action:-times(2, 6)

2

(3)

``

I want a procedure (say plot math container in a plot area) in place of arithmatic above.

OR I want a number of calculations under arithmatic ( a+b and a-b)

What is the method I should adopt? How do i insert another module or procedure inside the above module?

Which help page will help me?

Thanks.

Ramki

NULL


 

Download ModuleExample.mwModuleExample.mw

get command is used)?

I attach a module i made for edit and comment.

Thanks.

Ramakrishnan V

Can any one help me correct my doc wherein I want to record 5 minutes with microphone and play it for the same duration through my speaker with a click of button component. I find problem in file path specification.This document in my PC is  in E:\A_PhD2017\MAPLEPhDFiles\RequestCorrection_Microphone_Speaker_from_primetime.mw

Components added are only three: microphone0, Speaker0 and Button0

``

``

``

Edit*Data*Available*Action*contains*the*following*commands

rate := DocumentTools:-GetProperty("Microphone0", samplerate); 1; R := DocumentTools:-GetProperty("Microphone0", value)

Array(%id = 18446745571883247742)

(1)

Edit Click Action for Button contains the following commands.

R := DocumentTools:-GetProperty("Microphone0", value); 1; srate := DocumentTools:-GetProperty("Microphone0", samplerate); 1; DocumentTools:-SetProperty("Speaker0", samplerate, srate); 1; DocumentTools:-SetProperty("Speaker0", value, R)

16000

(2)

NULL

No errors displayed for both the above doc tools use``

Also nonstop continuous evaluation takes place! Where is the loop formation if at all there is any?

Thanks for answering

Ramakrishnan V


 

Download RequestCorrection_Microphone_Speaker_from_primetime.mwRequestCorrection_Microphone_Speaker_from_primetime.mw

PhDFiles\....mw

Meanwhile, thank you so much for everything.
I know I'm asking a lot but if you have time, you can help me do this?

Building a system of interactive components that, taken a function, two points 'a' and 'b' values ​​and an integer n, the calculations point between a and b in which the function assumes the minimum value by using the following procedure:

• It divides the values ​​between a and b into n equal parts (these will distance the one with the other (b-n)/2);
• calculates the function in each of these points;
• located between these values,  what is the minimum (in case of a tie, take the one closest to a)

I think i have to create a vector for each  part and  prehaps with a fcycle for, calculate the function, finelly i'll use minimize with all function.
Do you think is the correct procedure? If yes, how can I do it?

I need two buttons.
one should remove a row from DataTable0
and the second should add a row.

Here is my command and i will use to make the user interface.

Orginal:

for i to l do

for j from x to y do

block[i][j] := 1-block[i][j]

end do;

c_block[i] := block[i];

c_block[i] := parse(cat(c_block[i][]))

end do

Can someone help me to edit my command so that i can write it in Click Edit Action for a button? thank you.

Do(for i from 1 to %l do)
   Do(for j from x to y do)
      Do(block[i][j] = 1-block[i][j]); 
    end do);
   Do(c_block[i] := block[i]);
  Do( c_block[i] := parse(cat(c_block[i][])));
end do);

In this course you will learn automatically using Maple course Statics applied to civil engineering especially noting the use of components properly. Let us see the use of Maple to Engineering.

Static_for_Engineering.mw

(in spanish)

Atte.

Lenin Araujo Castillo

Ambassador of Maple

Hi,

Can anyone please suggest a way to set the zoom factor for a 3D plot from the plot commands or using DocumentTools or in some other way that doesn't involve the interactive tools?

What I'm trying to achieve is the following:

I'm developing MapleCloud worksheets for a course I'm teaching and want to give my students several 3D plots to interact with through their web browser.  When I make the plots, Maple determines the scaling so that boxed axes with labels will fit in the area of the plot component.  However, I'm making plots with axes=none that look better at a higher zoom factor (the corners of the unseen boxed axes would be out of the plot area but all the plot components still fit) and I'm keen to create the plots that look like this if possible.

My ideal solution would be for there to be a zoomfactor option for the plots[display] command or to be able to use some code like SetProperty("Plot0",zoomfactor,1.25) but I haven't been able to find a way to achieve this.  The closest I found was setting the viewpoint option, but that locked the view, preventing rotation, and I want to just set the initial view.  Is there some other method I haven't found?

Thank you for your help,

Alex

 

 

I am wondering if Selection Statement 'if' can be coded in Embedded Components such as Text Area.

I have typed codes in the Text Area(%text_beta_degress) as follows:

if %text_beta_degress=1.2 then Do(%text_ps=28);Do(%text_l4=5.439);
elif %text_beta_degress=8.77 then Do(%text_ps=15);Do(%text_l4=2.785);
elif %text_beta_degress=10 then Do(%text_ps=12.83);Do(%text_l4=2.348);
elif %text_beta_degress=14.4 then Do(%text_ps=5);Do(%text_l4=0.758);
end if

When I typed 1.2 or 8.77 into the Text Area(%text_beta_degress) and tapped 'Enter', %text_ps and %text_l4 didn't response.

Is there any solution?

In this paper we will demonstrate the many differences of implementation in the modeling of mechanical systems using embedded components through Maplesoft. The mechanical systems are used for different tasks and therefore have different structure in its design; as to the nature of the used functional elements placed on them, they vary greatly. This diversity is reflected in approaches and practices in modeling.

The following cases focus on mechanical components of the units manufacturing and processing machines. We can generate graphs for analysis using different dynamic pair ametros; all in real-time considerations in its manufacturing costs from the equations of conservation of energy.
Therefore modeling with Maplesoft ensures the smooth optimum performance in mechanical systems, highlighting the sustainability criteria for other areas of engineering.

 

XXXIII_Coloquio_SMP_2015.pdf

XXXIII_Coloquio_UNASAM_2015.mw

(in spanish)

L.AraujoC.

 

 

1 2 Page 1 of 2