Octave : strange error when using ones [closed] - matrix

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I don't know why I have this strange error when using Octave on Windows 7 64 bit :
when I use ones(100:100) to declare a matrix 100x100. No problem. But when I use : ones(10:100) I will have error :
memory exhausted or requested size too large
And if I use ones(10:15) I must wait for long time (about 30 seconds) to have answer.
Please explain for me this error.
Thanks :)

Your syntax is wrong. To create an m x n matrix it should be:
ones(m,n)
e.g.
ones(100,100)
or
ones(10,15)

Related

VHDL gray code counter [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm trying to implement a gray code counter using a shift register and a 4-1 MUX. Does anyone have an idea what logic to use?!
Thanks
I am not sure if this satisfies your requirement of "using a shift register and a 4-1 MUX", but here is a small and functional gray counter reference design by Altera:
https://www.altera.com/support/support-resources/design-examples/design-software/vhdl/vhd-gray-counter.html

create 10000 files with size 4k by using bash? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to do this.
Create 10000 files, (filename can be just combination of time and random number).
File size should be 4k.
And I want to time this. say how many seconds it will take.
How can I do this on bash?
Thank you.
time for x in {1..10000}; do
dd if=/dev/zero ibs=4k count=1 of=$x.txt 2>/dev/null
done

Searching for numerical algorithm realization [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Im searching for numerical algorithm realization for nonlinear equations system solver on PHP, C, C++, Java (with readable code :). Where I can find them?
Thx.
Look in Numerical Recipes -- the latest edition has reasonable C++ code. Even if they don't have code to exactly solve your specific application, there's a good chance they have something you can use.

What do these Fortran (90) statements do? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have run into the follow code and I do not understand it. What does it do?
A(*)
do n=(k,k-1,j+1-k)
A(*) looks like (part of) the declaration of an 'assumed-size array'; the typical use of this would be in the declaration of a dummy argument to a procedure. Distinguish carefully between assumed-size and 'automatic' arrays. Assumed-size arrays are deprecated in modern Fortran but common in FORTRAN77 and earlier variations.
do n=(k,k-1,j+1-k) looks like a syntactically-incorrect loop statement. The correct form would be do n=k,k-1,j+1-k which loops over the range [k,k-1] in strides of size j+1-k.

How do I snatch the error code from the trap frame? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
The Tao of Programming begins with the words:
Thus spake the master programmer:
"When you have learned to snatch the error code from the trap frame,
it will be time for you to leave."
Please enlighten me.
It is not for the master to enlighten the novice, it is for the novice to travel the pathways to become a master. When you see Tao you know.

Resources