photo

sasha


Active since 2014

Followers: 0   Following: 0

Message

Statistics

  • Thankful Level 1

View badges

Feeds

View by

Question


plotting step function with variable step length
I want to do a plot of y as a function of time. Where the values of y are either zero or one and they alternate. The time that y...

bijna 10 jaar ago | 1 answer | 0

1

answer

Question


Stand alone C file
I have my matlab code which is working, but a little slow. I want to write it for C, but I have an error that comes up when I us...

bijna 10 jaar ago | 2 answers | 0

2

answers

Question


numerically integrate multidimensional function along one dimension.
I have a function: f(x,y,z). I want to numerically integrate this function along x and be left with a function of only y and z. ...

ongeveer 10 jaar ago | 2 answers | 0

2

answers

Question


Does order of multiplication in a for loop matter?
I am currently trying to rewrite my code in a way to get rid of the for loops I have, but as I was doing that, I stumbled on som...

meer dan 10 jaar ago | 2 answers | 0

2

answers

Question


how to vectorize a for-loop or use parfor to speed it up?
I have this for loop right now: for x = 2:Nx_max-1 for y = 2:Ny_max-1 lp(x,y,t1) = (1/(2*h^2))...

meer dan 10 jaar ago | 1 answer | 0

1

answer

Question


speeding up nested for loops
I have a couple of nested for loops that take a very long time to calculate. Basically they look like: for x= 1:Nx for...

meer dan 10 jaar ago | 2 answers | 0

2

answers

Question


question regarding what is allowed in a parfor loop
I am confused about a section of the description of how to use parfor: " Next assume that A, B, and C are variables and that ...

meer dan 10 jaar ago | 1 answer | 0

1

answer

Question


How to save an array output to file every 1000 iterations?
My array is 201 by 201. And I want to watch it evolve by looking at every 1000 steps in time. Basically I have an initial array ...

meer dan 10 jaar ago | 4 answers | 0

4

answers

Question


Trying to define an array as the derivative of the terms of another array gives just zeros.
I have this code. Most of it is working fine. The problem is when I'm trying to define the array dpx and dpy. Instead of giving ...

meer dan 10 jaar ago | 1 answer | 0

1

answer

Question


Why is my if statement making the values of a previous array disappear?
My code basically looks like: for x = 1:xmax for y = 1:ymax for l = 1:xmax for m = 1:ymax ...

meer dan 10 jaar ago | 2 answers | 0

2

answers

Question


How to save only latest ~10 iterations on for loop
I'm trying to run a for loop that will give me a new iteration of a matrix at each time step. The problem comes in because I nee...

meer dan 10 jaar ago | 2 answers | 0

2

answers