Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.6K Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Compare two lists using ListLinePlot?

Posted 6 years ago

hello everyone, i hope that u can help me in my problem. i am doing a analysis of a mechanism, code is shown below: enter image description here

enter image description here I will put you in context: I need to compare two graphs between a function called second derivative "xB" and a list called "gx" (this is an imported list). Individually everything is fine (I mean that the graphs of each one are fine) but when I want to draw these two lists with the command and ListLinePlot [{gx, ax}] the program shows me the following error: enter image description here really i dont know how can i solve this error, I would thank you very much if you can help me

POSTED BY: Alexis Cepeda
2 Replies
Posted 6 years ago

Thank you, Neil. Works excellent!, i am very happy, i had been trying for days

POSTED BY: Alexis Cepeda

Alexis,

ax is a graphic object (a plot) and gx is data. You can construct the data for ax by using

ax = Table[{t, xB''[t]/.s },{t,0,5,0.001}]

I chose 0.001 spacing but you can change that. Also note your gx data runs from 0 to 5000 so you will need to divide the first element by 1000 if you want to plot them on the same axis. Alternatively make ax times in miliseconds:

ax = Table[{t*1000, xB''[t]/.s },{t,0,5,0.01}]

Regards,

Neil

POSTED BY: Neil Singer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard