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

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Douwe  
#1 Posted : 10 months ago
Douwe

Rank: Newbie

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

Why does this work?

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

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

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

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

Offline oscampo  
#2 Posted : 10 months ago
oscampo


Rank: Advanced Member

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

Was thanked: 119 time(s) in 81 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.