Matrix element

Matrix element - Calculating with arrays - 消息

#1 已发布: 2013/11/19 13:15:38
Henrique

Henrique

1个赞,共17个帖子。

组: User

Why it doesn't work on SMath ? It works fine on MathCAD 14.

Matrix element


EX1.bmp
#2 已发布: 2013/11/19 17:49:17
IVR

IVR

3个赞,共15个帖子。

组: User

1. Read program's documentation
2. Use for loop
#3 已发布: 2013/11/20 07:16:34
mb10

mb10

9个赞,共20个帖子。

组: User

#4 已发布: 2013/11/20 07:22:20
Henrique

Henrique

1个赞,共17个帖子。

组: User

I didn't find anything about calculating with arrays in this way. And it's not necessary to use loop as i won't test anything. In addition to typical linear algebra calculations, arrays in Mathcad are useful for performing calculations repeatedly over a range of values. See in the first image another SMath example and in the 2nd image how Mathcad does it:
ITERVEC.png
#5 已发布: 2013/11/20 12:03:09
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

SMath cannot handle vector-valued indices in expressions (AKA "range variables" in Mathcad). Therefore you MUST use loops or you rely on functions from 3rd party plugins like matlab c++ library by uni or Maxima, where nearly all functions can be applied to vectors (without indices). Your example reveals that you might not be aware of the difference between text indices and adress- or array indices.

Most of the tutorials for SMath adress this issue, as this is a very common pitfall for newbies.
Section matrix elementwise.sm (35.55 KiB)已下载 1612 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#6 已发布: 2013/11/21 12:13:51
Henrique

Henrique

1个赞,共17个帖子。

组: User

My intention was to reproduce in SMath Studio operations with vectors as in Mathcad. I understand you, but on Mathcad there is no problem to do like that. Besides, only now I'm working with SMath, and I also learning on how to use the program.
  • 有新帖
  • 无新帖