Hi
could you help me to program this one?
And the previous generated function works without m to (mod..).
see the picture.
It is better to attach your Mathcad Prime worksheet to the message.
@NM_10165576 wrote:
Hi
could you help me to program this one?
And again you are just posting one single handwritten example and are not willing to explain in more detail which rules apply to return this output from the given input? Is there anything you tried on your own (apart from retyping Stuart's program)?
Is this homework? Or where does this problem stem from?
Can only guess that you are looking for something like this:
Hah! I'm supposed to say, "That will teach me to read further down the thread before replying", but I know I'll be lying. I'd seen your reply earlier on and forgot to scroll down sufficiently far to see if you'd updated it.
I'd started to reply to this thread this morning, but, as usual, got distracted by bigger and better things, such as thinking, "A column swop function is just the ticket ... 🤔 ... and maybe a rotate right function to aid in its writing, none of that nasty iteration stuff when a multiplicity of functions will do! But now that I've started, I may as well generalize the idea to left rotation and row equivalents". After which, it all too readily spiralled out of control. 🙄
Nice use of the iff function, BTW ... although I would have snuck the vectorization inside, of course, albeit at the expense of more globally-warming typing. 😉
Stuart
Thank you for your response.
Yes, it is homework. can you pls share the logic and algorithm used by you and also password for protected area.
'Algorithm' is somewhat similar to what Stuart suggested.
The area is hidden on purpose because this forum is not intended for solving students' homework problems without them showing a good deal of effort of their own.
But of course you can expect help here if you do something yourself first, show your own efforts by posting the worksheet where you can't get any further at one point.
It would certainly also help to describe the task in more detail and to explain more clearly what exactly is required - the attached PDF scribble is rather suboptimal without further explanation and forces one to guess what exactly might be required.
Stuart has already given you a ready-made solution for a similar task in another thread and I think that he has also laid a good foundation for a start here with his contribution and his comments ...
While you are getting answers, the community is NOT here to do your homework for you.
As has been said, this isn't really the place to get others to do your homework for you. Other users will help people with specific problems, such as implementing a solution in Mathcad or tackling some intractable subproblem. However, those willing to help generally expect students to show evidence that they have tried to solve the problem. A worksheet littered with red is good because it gives the Community something to work with.
So, don't let what may seem like negative responses discourage you from using the forum; have a go and show what you're trying to achieve. It might help to walk through how you'd do it with pen and paper, For instance, how you'd use the binary representation of each row number to choose which letter to put where (as in generate), which columns you want the 1 in, what information you have that tells you where any other symbols should go. A scanned, hand-written note would be fine (please remember to add it you message as an inline photo, you can even paste images directly into the message area).
Stuart
Good day @Werner_E @StuartBruff
I am actually professional Engineer, and I need to create possible load combinations according to Eurocodes from load cases input and I am not an advanced Mathcad programmer, but I can manage simple programming.
I will attach my Mathcad work here and what am i doing with your help. Pls share the password and logic, if possible.
@NM_10165576 wrote:
Hi
could you help me to program this one?
And the previous generated function works without m to (mod..).
see the picture.
It's usually more accessible for the reader if you embed the picture directly into your message rather than as a PDF (or do both). You're also more likely to garner a quicker (and complete) response if you show your attempts to solve the problem or indicate your particular stumbling blocks,
As a starter for ten, however ...
An "obvious" pattern from your example is to replace each leading row element of generate with 1 and then "shift" the leading row over to the jth column. It might be helpful to break this down into smaller steps by creating a submatrix for each kth subgroup of s permutations. generate2 shows one method of partitioning L.
There are several ways to stitch the partitioned L back into a single matrix (eg, stacking subsequent partitions onto the first).
Stuart
PS. Yes, you're right that the 'mod' line was unnecessary. Sorry about that. I was playing around with some other idea that caught my fancy, got distracted, and forgot to remove it. Mea culpa.
The lambda argument to generate2 is just another example of me playing again and wondering if values other than 1 might be interesting.