Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We Like New Functions #526

Merged
merged 21 commits into from
Sep 5, 2016
Merged

We Like New Functions #526

merged 21 commits into from
Sep 5, 2016

Conversation

latot
Copy link
Contributor

@latot latot commented Sep 3, 2016

Hi again, well this time i have this functions, about the zero functions and related, i try avoid the most posible execute this line y = sym(eye(cell2nosyms(varargin){:}));, because this is fast eye(cell2nosyms(varargin){:}), but transform that to sym takes to much time with big matrix.

well other problem is, although i add the cell2sym function when i try execute it i get an error:

>> cell2sym({sym(1)})
error: 'cell2sym' undefined near line 1 column 1

and actually divisors depends of it, if still don't works maybe at least add it to private.

This Fixes #405 and add some functions of #215
Well. Cya.

@latot
Copy link
Contributor Author

latot commented Sep 3, 2016

from travis:

>>>>> processing @sym/cell2sym.m
***** test
 A = {1, 2, 3;4, 5, 6;7, 8, 9};
 B = [1, 2, 3;4, 5, 6;7, 8, 9];
 assert( isequal( cell2sym(A), sym(B)))
!!!!! test failed
'cell2sym' undefined near line 5 column 19

D:

@latot
Copy link
Contributor Author

latot commented Sep 4, 2016

moved the problem of cell2sym to #527

fix doctests
@latot latot mentioned this pull request Sep 4, 2016
varargin should be always a sym
%% -*- texinfo -*-
%% @documentencoding UTF-8
%% @defmethod @@sym charpoly (@var{x})
%% @defmethod @@sym charpoly (@var{x}, @var{y})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe A and x (or var) are better names here? Can you also file an issue for the missing vector output?

print_usage ();
end
y = uniop_helper (x, 'lambda a: exp(-a**2)*erfi(a)*(sqrt(S(pi))/2)');
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs a test, maybe something like:

octave:17> A = dawson([1 2])
A =

   0.53808   0.30134

octave:18> B = double(dawson(sym([1 2])))
B =

   0.53808   0.30134

octave:19> assert(A, B, -eps)

@cbm755
Copy link
Collaborator

cbm755 commented Sep 5, 2016

This looks great! Some minor comments above.

I don't really understand your eye, ones and zeros yet. Are you trying to support calls like:

zeros(sym(3), 2, 'double')

If so, those should be tested (and I don't think it works right now). Or is it for something else?

If easy, you could split off those functions and do a new PR and we can discuss. Then I can merge the other bits!

move eye, ones, zeros to ther pr
@latot
Copy link
Contributor Author

latot commented Sep 5, 2016

okidokis, all proposed changes applied! zeros and similar to this pr #532.

add seealso dawson
@cbm755 cbm755 merged commit ae8ab0c into gnu-octave:master Sep 5, 2016
@latot latot deleted the new_funcs branch September 5, 2016 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants