Items tagged with name name Tagged Items Feed

What I have done is stores algsubs names and expressions in a dual column matrix for later use. Now I need to assign them to each other. matrix is called store

column 1     column2

    a1             4.28x+2.3

    CX3          6.5x^2 +3x

    S1    ...

The following simple code

myproc1:=proc({parlist::list:=[]})
return parlist[1];
end proc:

myproc2:=proc(parlist::list)
return myproc1('parlist'=parlist);
end proc:

myproc2([1,2]);

fails with


Error, (in myproc1) invalid subscript selector

The reason is that myproc1 has the optional argument parlist, which has the same name as myproc2. myproc2 seems to make...

Add on to Guide

November 30 2011 by awehring 35

Thank you, Joe Riel !

 

I add your hint to my guide:

To get a variable conjugate(Y) is easy:

alias(conjugate(Y)=YB)

To get the bar above Y, you press Ctrl + Shift + " and then Underline

A little bit tougher is ...

I have a procedure that gets two lists A and B, I want to restore the name of the entry lists as string. How can I do that?

 

f(A,B) [procedure]

e.g. a(MyList,LL)

 

I want to restore a:="MyList" and b="LL"

 

TIA

It's a simple question, but I could not find a hint in the help system.

In economics it is very common to name variables like Y*, π* etc. They are unique, e.g. Y* ≠ Y

How can I enter them? If I just do it, it is interpreted as a vector function.

From time to time, you even need variables that have an overline (or bar),  above the character in addition to the asterisk, or variables like Â*.

A similar problem are variables that are named y' ...

Hello everyone.

When exporting by an multibody attachment, the name of the variables exported from a revolute or translational joint, are set by default, like "s_P2(t)", "theta_R", etc. If I wanted them to be named "x(t)",... , what will I have to do?

Is it possible to do directly, without using an alias?

Hi.

I have a procedure that takes multiple parameters, in which I want to fix all but one, and then define a single variable function that maps x to this remaining unspecified parameter, so I can give it to the plot() routine. I would like to define a number of such single variable functions for different values of the parameters and plot them all on the same axes.

Ideally, I would like to find a way to make the following, instead of returning 14, return 21,...

Page 1 of 1