Click here to Skip to main content
15,917,005 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: co-occurrence matrix Pin
Richard MacCutchan8-Mar-17 0:05
mveRichard MacCutchan8-Mar-17 0:05 
GeneralRe: co-occurrence matrix Pin
Member 130454588-Mar-17 19:25
Member 130454588-Mar-17 19:25 
GeneralRe: co-occurrence matrix Pin
Pete O'Hanlon8-Mar-17 20:48
mvePete O'Hanlon8-Mar-17 20:48 
GeneralRe: co-occurrence matrix Pin
Member 1304545814-Mar-17 22:46
Member 1304545814-Mar-17 22:46 
GeneralRe: co-occurrence matrix Pin
Pete O'Hanlon14-Mar-17 23:47
mvePete O'Hanlon14-Mar-17 23:47 
GeneralRe: co-occurrence matrix Pin
Richard MacCutchan8-Mar-17 21:13
mveRichard MacCutchan8-Mar-17 21:13 
GeneralRe: co-occurrence matrix Pin
Member 1304545814-Mar-17 22:38
Member 1304545814-Mar-17 22:38 
GeneralRe: co-occurrence matrix Pin
Richard MacCutchan14-Mar-17 23:00
mveRichard MacCutchan14-Mar-17 23:00 
AnswerRe: co-occurrence matrix Pin
Patrice T9-Mar-17 15:16
mvePatrice T9-Mar-17 15:16 
GeneralRe: co-occurrence matrix Pin
Member 1304545814-Mar-17 22:32
Member 1304545814-Mar-17 22:32 
SuggestionRe: co-occurrence matrix Pin
CHill6015-Mar-17 1:08
mveCHill6015-Mar-17 1:08 
QuestionAlgorithm try and figure this out in c# Pin
Member 1300374315-Feb-17 11:28
Member 1300374315-Feb-17 11:28 
AnswerRe: Algorithm try and figure this out in c# Pin
Richard Andrew x6415-Feb-17 13:40
professionalRichard Andrew x6415-Feb-17 13:40 
AnswerRe: Algorithm try and figure this out in c# Pin
Richard MacCutchan15-Feb-17 21:20
mveRichard MacCutchan15-Feb-17 21:20 
AnswerRe: Algorithm try and figure this out in c# Pin
Richard Deeming16-Feb-17 2:02
mveRichard Deeming16-Feb-17 2:02 
AnswerRe: Algorithm try and figure this out in c# Pin
Patrice T18-Feb-17 14:59
mvePatrice T18-Feb-17 14:59 
QuestionProof by mathematical induction Pin
Member 129868787-Feb-17 0:18
Member 129868787-Feb-17 0:18 
AnswerRe: Proof by mathematical induction Pin
Pete O'Hanlon7-Feb-17 0:42
mvePete O'Hanlon7-Feb-17 0:42 
SuggestionRe: Proof by mathematical induction Pin
Richard MacCutchan7-Feb-17 1:46
mveRichard MacCutchan7-Feb-17 1:46 
AnswerRe: Proof by mathematical induction Pin
Chris Losinger7-Feb-17 8:46
professionalChris Losinger7-Feb-17 8:46 
AnswerRe: Proof by mathematical induction Pin
Patrice T8-Feb-17 6:27
mvePatrice T8-Feb-17 6:27 
QuestionTrapezoid shaped movement (updated with the newest code and status) - SOLVED Pin
Joan M5-Feb-17 22:12
professionalJoan M5-Feb-17 22:12 
AnswerRe: Trapezoid interpolation Pin
Ralf Meier6-Feb-17 0:23
mveRalf Meier6-Feb-17 0:23 
GeneralRe: Trapezoid interpolation Pin
Joan M6-Feb-17 21:47
professionalJoan M6-Feb-17 21:47 
Hello Ralf,

Everything works.

I was simply trying to use a too high speed for a too short movement (totally obfuscated trying to get something impossible).

The only problem that I do still have is that I don't know how to efficiently find the maximum available speed.

What I'm doing is simple as:

VB
Do
 ta = Abs((vmax - v0) / a) ' Acceleration time.
 da = (v0 * ta) + (0.5 * a * ta * ta) ' Acceleration distance.
 tf = Abs((vmax - vf) / a) ' Deceleration time.
 df = (vf * tf) + (0.5 * a * tf * tf) ' Deceleration distance.
 If (da + df > dist) Then  ' if the accel and decel distances are bigger than the total distance...
   If (v0 = vf) Then  ' Only if v0 is equal than vf then we can calculate the time it will take to reach the middle position
     taux = (Sqr((a * dist) + (v0 * v0)) - v0) / a
     vmax = v0 + a * taux
   Else  ' Super slow way to search for the right speed (moreover it only decreases by 1 so it won't find exactly the right speed)
     vmax = vmax - 1  ' reduce the maximum allowed speed... it would be better to use a binary search than that,... but the best thing would be to use a mathematical calculation to find it...
   End If
 End If
Loop While (da + df > dist) ' We are doing this until the condition is met.


This works "perfectly":
- Avoiding the fact the maximum used speed will not be the purest maximum available.
- Avoiding the fact that it takes "ages" to find the maximum allowed speed for the current movement.

Any suggestion on how to find the maximum allowed speed in a faster way when v0 <> vf?

The initial data I do have is:

vmax (the one entered by the user it could be too high for what is possible).
x0 (initial position).
v0 (initial speed).
a (acceleration).
xf (end position).
vf (end speed (now we consider it always 0)).

Thank you.

modified 7-Feb-17 6:27am.

AnswerRe: Trapezoid interpolation Pin
Ralf Meier7-Feb-17 0:00
mveRalf Meier7-Feb-17 0:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.