Skip to main content
1-Visitor
October 1, 2018
Solved

Create variable names automatically

  • October 1, 2018
  • 2 replies
  • 4664 views

Greetings colleagues of the forum, I have the following query:
How to create variable names automatically?
By programming a loop I get the names of variables but as text strings, I want to get a matrix like the one marked in red?

 

crear variables automaticamente.png

 

 

 

Is there any way to do it in Mathcad Prime 4?

I would appreciate any suggestions.

Best answer by Werner_E

The closest you may come to is using matrix variables.

It depends on your needs if this can be useful for you.

B.PNG

2 replies

23-Emerald I
October 1, 2018

There is a string to number function; but it will not create variable names.  Short of some fancy coding (which Prime still won't do) there's no way.

rhanet1-VisitorAuthor
1-Visitor
October 5, 2018

Hello FredKohlhepp, thanks for your comment. I agree with what you say, I found that in Mathcad 15 there is a script to do it; but the problem is that I'm working with Mathcad Prime on this.

Werner_E25-Diamond IAnswer
25-Diamond I
October 2, 2018

The closest you may come to is using matrix variables.

It depends on your needs if this can be useful for you.

B.PNG

rhanet1-VisitorAuthor
1-Visitor
October 5, 2018

Hello Werner_E, thanks for your suggestion. I had already tried it but since I have to do operations later I get an error and it does not work. However some operations can be performed.

I am reformulating my problem in other ways so as not to have to use numbered variables.