mmcdara

3728 Reputation

17 Badges

6 years, 67 days

MaplePrimes Activity


These are replies submitted by mmcdara

@acer 

I don't think I'll have more complex piecewise structures.

Explanation: I work on differential systems with an independent variable t and dependent variables x1(t), ...xN(t). These systems contain terms which depends only on t (think to accelerations for instance) which represent the "loadings" the system is submited to. These loadings are piecewise reconstructions of experimental records that I want to "extract" in order to modify them.

Nevertheless your remark was pertinent, better to strike while the iron is hot.
 

@Preben Alsholm 

Thank you,
It takes a lot of mental gymnastics to understand how satisfies works, but it seems indeed very powerfull

@Preben Alsholm 

Thank you Preben.
I had done the first step but wasn't capable to go further.

A question: 

# Why did you use
select(hastype,expr,specfunc(piecewise));
# instead of
select(has,expr,piecewise);
# ?

... and another one:
Can you explan me how  does And(relation,satisfies(r->lhs(r)=t)) work?

select(hastype,expr,specfunc(piecewise)):
map(u -> hastype(u, And(relation,satisfies(r->lhs(r)=t))), [op(%)])
                   [false, true, true, true]

 

@Ramakrishnan 

Ok, see you next time

@acer 

Thank you acer for this detailed answer.
I agree that developping a procedure which pretty-prints general expressions is probably a hard task (mainly because of bracketing) and a waste of time.
My question to @vv was more motivated by curiosity than by an imperative need.

thank you both @acer and @vv for reminding me the existence of neutral operators...

@acer 

Thanks.
Don't worry about the version, I'll have my professional 2021 back very soon.

@vv 

Same reply as @tomleslie "Of course you are correct!"

By the way, do you know is there exists something to display a ligical proposition in a more "readable.consise" form?
Something like this...

rew := {
  Logic:-`&and` = `#mo("⋀")`,
  Logic:-`&or`  = `#mo("⋁")`,
  Logic:-`&not` = `#mo("¬")`
}:

a &and &not(a &or b);

eval(%, rew)

...or whether it is to be done in an ad hoc manner?

Last question: by simple curiosity, what is the process that makes something like Logic:-`&and`(a, b)
to be displayed a &and b and not &and(a, b)?

@Carl Love 

Your 2 functions are identically null over the domain x=0..2, y=0..1 (and I do not think it is what @Ramakrishnan wants?)
More of this they take different values over domains of the form x=a..0, y=a..0 (a < 0) where f2 remains identically null.

What I would have done, given my interpretation of the question, is this

S := (a, b, u, v, f) -> `if`(verify(u, a, interval) and verify(v, b, interval), f, 0);
plot3d('S(0..1, 0..1, x, y, x+y)+S(1..2, 0..1, x, y, x-y)', x=-1..3, y=-1..2);

... but it's just my interpretation and @Ramakrishnan seems happy with what you did 

@vv 

An very slight improvement (?)
 

restart;
f:=(exp(x^2)+exp(1))/(exp(x^2)-exp(1))+3;
b:=0: p:=0: q:=eval(f, x=0)+r: a:=-c;
circ := (x-p)^2+(y-q)^2-r^2: F:=unapply(eval(circ, y=f), x):
sys:=numer(simplify([F(c), D(F)(c)])):
fsolve(sys);

 

@vv 

Thank you for this intelligent and necessary (it successfully handle my first test case) reappropriation
(I hope this last term is the good one for its meanings in French and English seem to diverge slightly)

 I vote up

@nmacsai 

Another comment
If you have to open/close your csv file multiple times, it's worth saving it as a binary file and using that afterwards .
Note that @Carl Love's answer essentially raises the main question. 

@Carl Love 

"That depends on who's doing the recommending"

People who are used to handling  big data files generally agree on the point that CSV files are not optimal from the point of view of efficiency (red/write time and memory size).
For archiving (even if I do not understand what you mean), there exist more efficient file format than csv, for instance JSON or NetCDF to say a few (which is a binary self domumented format which can handle complex data structures).

See here big-data-file-formats-explained-dfaabe9e8b33 for instance

From my own experience (shared with many of my coworkers) I (most of us) think that a lot of people keep using CSV files or alike just because they can "see" what these files contain and that this reassures them.

What is funny is that you critize my comment about prefering binary format and that at the same time your answer to the @nmacsai  is based upon m files (which are binary files), thus implicitely considering binary format would be a better solution than csv.

 

Just a comment...
As a general rule, regardless of the language used, it is not recommended to work with csv files this size.
It is much more efficient to use binary files instead.

@kiraMou 

Sorry, I didn't read carefully enough.
To make up for it, here are some further details that might interest you:
solutions.mw

@kiraMou 

I thought you wanted solutions whose imaginary parts were in the range 0.5..1 for x[1] and x[2] and in the range -1..-0.5 for x[3] and x[4]?

The solution you give obviously does not meet these requirements.

Do I missed something?

First 15 16 17 18 19 20 21 Last Page 17 of 86