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 Douwe  
#1 Posted : 09 April 2024 00:04:23(UTC)
Douwe

Rank: Newbie

Groups: Registered
Joined: 08/04/2024(UTC)
Posts: 1

Why does this work?

LEDCalc.sm (11kb) downloaded 8 time(s).

But when I reverse V_fwd, it throws an error (argument can not be scalar):

LEDCalc_reverse.sm (11kb) downloaded 7 time(s).

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

Offline oscampo  
#2 Posted : 09 April 2024 04:03:46(UTC)
oscampo


Rank: Advanced Member

Groups: Registered
Joined: 10/12/2009(UTC)
Posts: 247
Man
Colombia
Location: Cali, Colombia

Was thanked: 87 time(s) in 66 post(s)
The reverse() function must be applied on matrix or vectors. When you vectorize the expression:
qaz_001.png

the vectorize function applies reverse() to each element of V.fwd, not to all vector V.fwd, so to solve this, you must apply reverse() to vector V.fwd, and then use in the vectorized calculation:

wsx_001.png

Best,
Oscar
Users browsing this topic
Guest
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.