Graphing

Graphing - insert plot- 2D versus insert x-y plot - Сообщения

#1 Опубликовано: 01.04.2017 23:45:15
Joe

Joe

0 сообщений из 14 понравились пользователям.

Группа: User

Page3.png

I am not sure why SMath does not like insert - plot - 2D for f(u)

Thanks
Joe
#2 Опубликовано: 02.04.2017 03:51:35
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello Joe,

That is because you have to put "x" as a formal argument in the insert 2D plot (it is always "x" to f(x)). For insert 2D plot it does not matter if "x" is previously defined or not. XY plot works differently. It needs an undefined argument (f(x) and f(u) are the same as long as both "x" and "u" are undefined).

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Опубликовано: 02.04.2017 08:32:18
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

I am not sure why SMath does not like insert - plot - 2D for f(u)



For the "QuickPlot" the plotting canvas argument is 'x' only 'x'.
You will have lot of pleasure plotting stuff in Smath.

Jean

Forum Plot Fun.sm (6 КиБ) скачан 46 раз(а).
#4 Опубликовано: 02.04.2017 13:32:37
Joe

Joe

0 сообщений из 14 понравились пользователям.

Группа: User

Radovan / Jean:
I understand now.

Another question - I am reading through all the handbooks and as I read I keep adding the examples into a SMath page so as a result I will define and redefine variables ('x') and functions ( f(x) ) many times as I work through the example problems. I have run into a issue where it appears SMath gets confused if I redefine 'x' or f(x) too many times. I get error messages but if I copy and paste the particular section onto a new page by itself everything works. Again is there something I am doing wrong?
Thanks
JoeSMath Solving Equations.sm (226 КиБ) скачан 40 раз(а).
#5 Опубликовано: 02.04.2017 14:39:54
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello Joe,

In your example roots(f(x),x)= will not work because you have x defined previously. Function roots() needs undefined variables. There is no consensus here about undefined variables in the cases similar like this one. You might use some variables that have low chances to be defined in your worksheet (something like roots(f(#x),#x)= or roots(f(_x),_x)= etc.)

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#6 Опубликовано: 02.04.2017 22:05:12
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

Another question



Several answers:

1. some notes [red] in your work sheet.
2. the quick cubic solver is "polyroots".
The Cardan cubic does not supports complex roots.
There is a special cubic solver from Maple [attached].
3. the classical solve [x,y,z ...] works simply.
It may fail if the system is not true, for instance if
the matrix is not from true numbers. Observe carefully
the example so much from so little.

Jean

Cubic solver.sm (48 КиБ) скачан 39 раз(а).

Solve [x,y,z] Compactum.sm (92 КиБ) скачан 40 раз(а).

SMath Solving Equations.sm (226 КиБ) скачан 49 раз(а).


#7 Опубликовано: 02.04.2017 23:06:18
Joe

Joe

0 сообщений из 14 понравились пользователям.

Группа: User

Thank you both
Joe
#8 Опубликовано: 03.04.2017 06:42:53
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Hello Joe,

This Smath document is interesting. At the end of page 2, the graph is in two segments.
The blue segment is the plot of the explicit subsonic Mach, the red segment is the
plot of the supersonic Mach.
The supersonic is the implicit 'solve' roots(3). As 'x' runs on the canvas, "roots"
solves for each encountered canvas pixel, thus the very fine trace ... much finer than
Mathcad 11 and earlier versions that did plot on ½ pica.

The other CAS that plots fine trace is "OriginLab". It does not plot function f(x),
it plots from data vector but it splines "Bézier" between canvas points. Thus provides
as fine trace as Smath.

Cheers, Jean

Inst_Mach Number Pitot.sm (191 КиБ) скачан 48 раз(а).
#9 Опубликовано: 03.04.2017 12:22:45
Joe

Joe

0 сообщений из 14 понравились пользователям.

Группа: User

Thank you Jean -I will look it over. I am still working on the cubic solver file you posted.
Joe
#10 Опубликовано: 05.04.2017 13:24:58
Joe

Joe

0 сообщений из 14 понравились пользователям.

Группа: User

Wrote

Hello Joe,

In your example roots(f(x),x)= will not work because you have x defined previously. Function roots() needs undefined variables. There is no consensus here about undefined variables in the cases similar like this one. You might use some variables that have low chances to be defined in your worksheet (something like roots(f(#x),#x)= or roots(f(_x),_x)= etc.)

Regards,
Radovan



Radovan:
Lo and behold after spending a lot of time trying to work the issue and then posting the question on this forum, on the next page of the primer was exactly what you said............
Joe
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений