Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline hpf_br  
#1 Posted : 19 November 2013 20:15:38(UTC)
hpf_br


Rank: Member

Groups: Registered
Joined: 19/11/2013(UTC)
Posts: 17
Brazil

Was thanked: 1 time(s) in 1 post(s)
Why it doesn't work on SMath ? It works fine on MathCAD 14.

Matrix element

hpf_br attached the following image(s):
EX1.bmp

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline IVR  
#2 Posted : 20 November 2013 00:49:17(UTC)
IVR

Rank: Newbie

Groups: Registered
Joined: 30/08/2011(UTC)
Posts: 8

Was thanked: 3 time(s) in 2 post(s)
1. Read program's documentation
2. Use for loop
Offline mb10  
#3 Posted : 20 November 2013 14:16:34(UTC)
mb10


Rank: Member

Groups: Registered
Joined: 27/08/2013(UTC)
Posts: 19
Italy

Was thanked: 9 time(s) in 5 post(s)
Offline hpf_br  
#4 Posted : 20 November 2013 14:22:20(UTC)
hpf_br


Rank: Member

Groups: Registered
Joined: 19/11/2013(UTC)
Posts: 17
Brazil

Was thanked: 1 time(s) in 1 post(s)
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:

Edited by user 20 November 2013 14:35:48(UTC)  | Reason: Not specified

hpf_br attached the following image(s):
sm.png
ITERVEC.png
Offline mkraska  
#5 Posted : 20 November 2013 19:03:09(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,990
Germany

Was thanked: 1128 time(s) in 724 post(s)
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.
File Attachment(s):
Section matrix elementwise.sm (36kb) downloaded 126 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline hpf_br  
#6 Posted : 21 November 2013 19:13:51(UTC)
hpf_br


Rank: Member

Groups: Registered
Joined: 19/11/2013(UTC)
Posts: 17
Brazil

Was thanked: 1 time(s) in 1 post(s)
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.
Users browsing this topic
Guest
Similar Topics
Assign unit to a matrix element within a foor loop (Questions)
by kratikus 10/06/2022 16:52:21(UTC)
slow extraction of matrix elements (Questions)
by Jopi 14/09/2021 12:13:45(UTC)
Using Matrix element in Boolean evaluation (Bugs & Problems)
by alyles 22/11/2017 21:06:57(UTC)
Cannot get matrix element (Bugs & Problems)
by MK001 02/05/2015 21:02:38(UTC)
Vector & matrix element magnitudes (Questions)
by FrugalTPH 18/12/2012 15:16:17(UTC)
Feature Req: Matrix Elements as a Group of Individuals (Project discussion)
by Guest 17/11/2010 03:36:28(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.