C_R

3727 Reputation

21 Badges

6 years, 204 days

MaplePrimes Activity


These are replies submitted by C_R

How is the mass distributed?

Rolling means no slippage possible?

@acer 

The progress bar is nice! It seems that there are some possibilities for the advanced user.

For beginners there should be something simple (easy to find/discover, understand and to use) when starting with loop statements in Maple. It does not have to be perfect.

A console window would be a great supplement to a simple solution. I would prefer separate windows.

I believe most people would prefer a solution where the output appears in a text area after the loop, ideally where repeated output from a loop typically appears. Something like that

restart;

with(DocumentTools):

with(DocumentTools:-Components):

with(DocumentTools:-Layout):

s := "0":

T := TextArea(s, identity = "TextArea0"):
xml := Worksheet(Group(Input(Textfield(T)))):

#insertedname:=InsertContent(xml)[1,1]:

box_printed:=false:
for i to 10 do
if (not(box_printed))then
   insertedname:=InsertContent(xml)[1,1]:
   box_printed:=true:
end if:
Threads:-Sleep(1);

DocumentTools:-SetProperty(insertedname,value,sprintf("%d",i),refresh=true);
end do:

Maplets:-Examples:-Message("Done");

Can't one of the print commands be modified to do this (i.e. avoid a line feed)? This would be much easier than learning DocumentTools.

At least there is a solution that would not have occurred to me. 👍

Download text-area-update-progress_after_loop.mw

L as used in line 3 is of dimension time. In line 4 you want L to be zero when the time is between 1 and 2 (days?).

Otherwise you want L, which is of dimension time, to be C, which is probably of a different dimension.

What you probably want is to define a piecewise function for C:

C:=piecewise(time condition,first concentration dosage 1, concentration dosage 1 + concentration dosage 2) where concentration of dosage 2 is timeshifted.

Concering C: Do you really want C to be a product of a constant and a time depended exponential term?

there is an Error before the plot comand

@tomleslie 

Its a single element list exported from

It looks like I have always been removing brackets from expressions when working manually, without realizing that it is a requirement for using isolate.

Thank you all for the quick response!

@Maxie 

You could try to adopt the following for your problem

https://www.mapleprimes.com/posts/220877-Ball-Bouncing-On-A-Flexible-Beam

 

@sursumCorda 

I was looking for something like that! 👍

 

@ecterrab Could you have a look if the output of Physics:-Substitute in the attached is as intended?

 

Another_way_with_Physics_Substitute.mws

@mmcdara 

I can’t see a better way without referring to advanced statements like applyrule. Thank you!

 That what i get with 2023

As an alternative to dharr's answer, which does the fit in mA, you could divide values in Y by 1000 do get results in A which fit to C in muF.

The book is correct. See the plots in my reply to dharr below

@dharr Just a check that the data is in mA. I have never used units and fits so I stopped after checking that the parameters fit to the data. So maybe your tweak with mF is not required.

restart

U := 100*Unit('V')

100*Units:-Unit(V)

(1)

R := 4900*Unit(Unit('Omega'))

4900*Units:-Unit(`Ω`)

(2)

C := 20*Unit('`μF`')

20*Units:-Unit(`μF`)

(3)

"v(t):=U/(R)*(e)^(-(t/(R*C)))"

proc (t) options operator, arrow, function_assign; U*exp(-t/(R*C))/R end proc

(4)

simplify(v(.1*Unit('s')))

0.7356077312e-2*Units:-Unit(A)

(5)

``

data := LinearAlgebra:-Transpose(`<,>`(`<|>`(.1, .2, .3, .4, .5), `<|>`(7.36, 2.7, .99, .37, .13)))

Matrix(%id = 36893489545658315588)

(6)

p1 := plot(data, style = point)

 

p2 := plot(v(t), t = .1*Unit('s') .. .5*Unit('s'), useunits = [s, mA])

 

plots[display](p1, p2)

 

``

NULL

Download Mapleprimes_Question_Book_2_Paragraph_5.12_Question_5_with_units.mw

@Carl Love 

Maple provides so many solutions, that I rarely need to code (and test) procedures.

In case I have to pass a function I will not try it make work a you said. Thank you for bringing this to my attention.

As for Fortran, I do not mis goto but I have kept a few punch cards that I use as bookmarks for sentimental reasons. I will see if I can find a goto card as physical proof that those statements were in use ;-)

@Kitonum 
Also with my 2023 installation

@acer

This particular value for posint is worth an example in the detaled helppage of fslove.

Infinite thanks!

First 55 56 57 58 59 60 61 Last Page 57 of 75