Message Boards Message Boards

0
|
3966 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Can I name a variable D(1,0,+1/2) in Mathematica?

Posted 9 years ago

I'm trying to use variables with names as D(0,0,0), D(1,1/2,+1/2,), etc. But I don't know how to do it.

POSTED BY: Gabriel SC
4 Replies
Posted 9 years ago

Would something along these lines be useable?

MakeVarList[x_, {n_, m_, o_}] := 
 ToExpression[
  ToString[x] <> ToString[n] <> ToString[m]]


v = MakeVarList[f, {18, 15, 23}]

Paul.

POSTED BY: Paul Cleary
Posted 9 years ago

Such constructions would make things very awkward for me but you must have some special purpose in mind for doing so. If you would mention something about the "why", your chances of getting the exact help you need would be greatly increased.

POSTED BY: Jim Baldwin
Posted 9 years ago

Thanks for your reply S. M. Blinder. Actually, the answer to my question is no but I made great progress with (for example): Subscript[D,"(1,0,+1/2)"].

POSTED BY: Gabriel SC

Try to define a function f[a,b,c_]:= . . . D is a restricted symbol.

POSTED BY: S M Blinder
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract