## 105 Reputation

10 years, 311 days

## Warning, implicitly declared loacal to p...

Hello, could someone please help me to understand this warning that i'm getting?

Warning, `N4ds` is implicitly declared local to procedure `SFunc`

Thanks

## Find the position of the value closest t...

hello, I have a list of numbers, for example [1.2,5.6,7.2,0.5,-0.25,-4,6]. I would like to find the position of it in the list where the number is closest to zero. May I know if there is a function for this please? Thanks.

## How to use "subs[inplace]" element wise?...

Hello, I have different values to substitute into my theta in a matrix. I tried to use the subs function but the results came out are all dashes. Have you any idea how to fix it please?

AA:=RandomMatrix(3,5);
BB:=map(cos,AA*theta);
CC:=RandomMatrix(3,5);

I tried method 1:

subs[inplace](theta=CC,BB);

Method 2:

DD:=Matrix(3,5);
for m from 1 to 3 do
for n from 1 to 5 do
DD(m..m,n..n):=subs(theta(m..m,n..n)=CC(m..m,n..n),BB(m..m,n..n));
end do:
end do:
DD;

Thank you.

## Uncertainties about for loop...

Hello, I have a term that do not have the variable 'n' in it, but why is the calculated number different? For example, why is

QQ:=Matrix([[3],[4],[1]]);

for m from 1 to 2 do
for n from 1 to 2 do
QQ:=(QQ*m)+QQ;
end do:
end do:

different from

QQ:=Matrix([[3],[4],[1]]);

for m from 1 to 2 do
QQ:=(QQ*m)+QQ;
end do:

## How do I use the 'solve' function in a m...

Hello, I have quite a complex thing to solve, but would simplify it here. I would like to solve the unknown in a matrix, how can I use the 'solve' function? For example

A:=Matrix(3,1,4)
B:=Matrix(3,1,[2,7,9])
The relation between them is A=B*y

How can I use the below function?
solve(A=B*y,y）

 1 2 3 4 5 6 7 Last Page 1 of 17
﻿