How to make this function to work also for scalars, if possible?
Apr 01, 2024
04:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 01, 2024
04:57 AM
How to make this function to work also for scalars, if possible?
Labels:
- Labels:
-
Mathcad Usage
ACCEPTED SOLUTION
Accepted Solutions
Apr 01, 2024
05:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 01, 2024
05:53 AM
5 REPLIES 5
Apr 01, 2024
05:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 01, 2024
05:12 AM
In this way:
But right now I inserted manually 1x1 matrix element.
So, giving a scalar value like (or any scalar value):
expm function to be able to transform this scalar into 1x1 matrix element. Is it possible like this to add something like that in the above expm function? Or I need to be careful and put manually the 1x1 matrix element like above when I want to perform a calculation with this expm function with scalar values?
Apr 01, 2024
05:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 01, 2024
05:53 AM
You can use the function IsScalar(), like this:
Success!
Luc
Apr 01, 2024
06:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 01, 2024
06:37 AM
In (express) Prime your function could be:
then:
gives:
and:
gives:
Success!
Luc
Apr 01, 2024
06:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 01, 2024
06:45 AM
Works also with your first suggestion also in Prime:
Apr 03, 2024
09:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 03, 2024
09:38 AM
if A is a scalar, simply turn it into a 1x1 matrix
