splatcat

10 Reputation

4 Badges

12 years, 4 days

MaplePrimes Activity


These are questions asked by splatcat

Hi,

I am trying to do somthing like this (I actually have a 5D Array, this is a simple example) (mathematica code)

a = { {{1,2,3},{4,5,6}},{{1,2,3},{4,5,6}},{{1,2,3},{4,5,6}}};

Transpose[a, {1,3,2}]

 (* this {1,3,2} dictates what gets transposed e.g. {1,2,3}, would leave the Array the same, and the example transposes the last two dimentions*)

in maple.

After some research it seems it makes sense in maple to use an...

Possibly a quick one,

I have two sets of precedures, both return the right values however one returns the values alone e.g.

x := 123123.2312323

 

The other wrongly returns

x :=  Return(123123.2312323)

I have literally pages of code, any suggestions why this would be the case?

 

Thank you!!!

Hi Guys, I hope you can help!

I am stuck trying to plot a function that has a conditional based on 'x' the plotted variable.

e.g.

> pltx := proc (num1::integer, num2::integer, x) 
if 1 < x then
return 0
elif x < 0 then
return 0
else
return num1*x^num2
end if
end proc;

> d := plot(pltx(2, 5, x), x = 0.1 .. 0.4);

Error, (in pltx) cannot determine if this expression is true or false: 1 < x

Hello and thank you in advance,

I am used to Mathematica and am looking to switch, conditionals in Mathematica seem easy, like say

 

  If[0 < z && -6 <= y <= 6 && 0 < x < 1             ,Null             ,Return[0]];

 

How do you replicate this in an easy to read way without lots of nested if statements?

Page 1 of 1