Message Boards Message Boards

0
|
4240 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 10 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

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

POSTED BY: S M Blinder
Posted 10 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
Posted 10 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 10 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
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