Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi there
I have a problem with this function . The issue is R is a cumulative value so the R2=R0+R1>
R3= R0+R1+R2 and so on... I wanted to implement that in this function but an error ( must be a vector ) shows
Is there a way to fix this or to write it differently
Thanks
The sheet is attached prime 11
Solved! Go to Solution.
There should be no difference between an explicit and an implicit (invisible) multiplication.
Implicit multiplication is called "scaling operator" by PTC and usually is used between a quantity and its unit, like in
which seems to be the reason why PTC has chosen Ctrl-Shift-U for the keyboard short.
But its allowed to use that operator between two 'normal' variables or constants as well, as you did for some reason. Problem only may be that its harder to read and to distinguish between a single variable H2O4 and the product H2 O4..
There is one difference though and this is why we could use that scaling operator as some sort of postfix notation when calling a function: If the second operand is a function name, this function is applied to the first operand:
According your other problem I sure would need a worksheet to play with (preferably with small demo data and nice simple variable names) and this time it should clearly show the problem you experience. It's still the many NaN's, or is it something else?
It's necessary that you clearly state what the problem is! E.g. in your last post you wrote " the difference now my M,f1 and q are nested " but the screenshot you showed below this statement did not use any f1 or q - that's confusing! f1 and q were seen in the screenshot above this statement but this seems to be working as expected.
Hi Werner
Thank you for the explanation . Now it is clearer in mind that the difference between the two dots doesn't mean dot product and vector product .
For my problem . Yes f2 still all NaN unfortunately.
in my original sheet this is the result
but I got M
I'm trying to do the same function in smaller sheet for you to use , but I got this
actually it is not important for me in this mock sheet because I have the results in the main sheet ... but I need to fix the step after to find f2 and write the correct iterator
Can you help me with this ... would you just got any results for M and fix f2 ?
Thanks
Yusra
I feel like we're going around in circles! 😞
The sheet you just posted shows (again, or still) the already explained problem with the 1x3 matrix instead of the expected 3x1 matrix.
That should have been dealt with and sorted out long ago!
@YA_10963798 wrote:
Hi Werner
Thank you for the explanation . Now it is clearer in mind that the difference between the two dots doesn't mean dot product and vector product .
Both operators give you the vector dot product if applied to two vectors unless you explicitly vectorize the expression
The outer vector product (cross product) is a separate operator and accepts 3x1 vectors only
In my original sheet it is working I got M ... but yes there all matrix have the same dimensions .
See I got M
I need to fix f2 only
so even if you fix M anyway you prefer it is okay . I just need to fix the iterator in f2 function
Do you want me to share the original sheet ?
Can't you create a simple but correct demo sheet duplicating the problem.
I guess I will be much too confused by the many similar but different irritating variable names and the huge data of your original sheet.
I think its important to break down the problem to its basic cause and honestly I don't understand your "I need to fix f2 only" as i can't see any f2 anywhere and would not know what to fix.
BTW, in your original sheet - are you sure that the three elements of M.i.center are normal 1594x1 vectors containing just scalars and NaN's?
Try to display one of these vectors -> M.i.center[1= and see what the result is.
