Respondida
Newline in text files
When I want to explicitly write \n for new-line I include it explicitly in the string-specification: fid1 = fopen('Testfile.txt...

más de 5 años hace | 0

| aceptada

Respondida
How to fix/steady the position of a counter in plot title.
Perhaps you can use the same type of zero-padding often used for filenames? Something like: tstr = sprintf('%04d',loop_idx); O...

más de 5 años hace | 0

Respondida
Reshape data vector for a surf plot over a non-rectangular domain
If you have your x, y and z data in 1-D arrays you can use trisurf see the help and documentation for that function for usage. I...

más de 5 años hace | 1

Respondida
2d image reconstruction from 1D images
That definitely looks like the text-book definition of the Radon-iRadon transform pair setup. The limitation here is the 10 stri...

más de 5 años hace | 0

Respondida
Error: Index in position 1 exceeds array bounds
I think you would benefit from using the fact that there is information about the number of elements in a contour-segment in C. ...

más de 5 años hace | 0

Respondida
Interp1-Input coordinates must be real.
Then it must be because your theta_n has become complex. How that came to be is impossible to guess based on this information. I...

más de 5 años hace | 0

Respondida
correlation of two signal
Why do you want to use circshift? That would put some of your last samples first! That's not the way to go about this. To do th...

más de 5 años hace | 0

| aceptada

Respondida
ODE solving lack of span inputs
OK, you have 2 coupled ODEs. If I expand the D/Dt(log(V(t))) to 1/V(t)*D/Dt(V(t) I'd get something like this: function dVdtdcad...

más de 5 años hace | 0

| aceptada

Respondida
ODE solving lack of span inputs
The error is most likely in the second ode45-call. In that subfunction the time t will always be a scalar. You might want to cha...

más de 5 años hace | 0

Respondida
Defining ODE function as function file
The way you've coded ConcA it should solve an ODE that looks like this: That might very well be the ODE you need to solve, bu...

más de 5 años hace | 0

Respondida
How to use ODE solvers for a 2nd order differential equation with a Mass Matrix ?
As far as I understand all you have to is to do the same conversion from a system of second order ODEs to a twice as big system ...

más de 5 años hace | 1

| aceptada

Respondida
Background Subtraction In Images:
Instead of using sprintf to generate the full (or relative, doesn't matter which) path to your images you should use fullfile. T...

más de 5 años hace | 0

| aceptada

Respondida
How to remove Drift in the periodic signal after numerical Integration
The function detrend was made for this type of task. It should work like this: y_detrended = detrend(y); If you have a higher-...

más de 5 años hace | 0

| aceptada

Respondida
ODE45 SIR model problem
In your initial conditions you have everyone perfectly "healthy" - therefore no one will ever get infected. You have to set at ...

más de 5 años hace | 0

| aceptada

Respondida
list of csh commands to be run from matlab script
You might accidentally start a c-shell with your first csh command. My suggestion is that you put all csh-commands into a csh-sc...

más de 5 años hace | 0

Respondida
How do I get two circles from a thick, noisy arc?
This is how I'd go about it: (Perhaps 0, apply some low-pass filtering to reduce the speckle and make image smoother.) 1, find...

más de 5 años hace | 1

Respondida
Surface plot not displaying full data range
Once uppon a time... ...I was very annoyed with this behaviour of matlab's surf and pcolor functions - it treats the values and...

más de 5 años hace | 0

Respondida
I want to use a 4th dimension as color in quiver 3d plot.
You will find at least a couple of color-capable quiver-like submissions on the file exchange. For example: quiver3_c or quiver2...

más de 5 años hace | 1

| aceptada

Respondida
The function without if statement
That should to be the same as: VectorIm = ManyVecImage(:,Values < 10000); HTH

más de 5 años hace | 0

Respondida
Calculating surface integral on Cartesian grid
For the sake of simplicity I'd just calculate the area of the grid-cells, multiply the velocity-vectors with those areas and add...

más de 5 años hace | 0

Respondida
Numerically calculate the eigenstates and eigenvalues of a shrodinger equation with linear potential
If you go to the file exchange you will find a fair number of contributions that solves Schrödinger equations in different geome...

más de 5 años hace | 1

Respondida
Solving a system of integral equations self-consistently
Why doesn't your solution to two (I assume similar) integral equations work for this case? Here's a QD-cookup (that doesn't wor...

más de 5 años hace | 2

| aceptada

Respondida
Erasing the boarders in an Image
Simply crop out the black frame. Something like this: Img_frameless = Img_in(y_min:y_max,x_min:x_max); % for a grayscale image ...

más de 5 años hace | 0

Respondida
Remove specific frequencies from FFT signal and reconstruct the signal after filtering those frequencies
Those high amplitudes are a noise in the signal. Not the noise in the signal. To remove such interference-components you will be...

más de 5 años hace | 1

| aceptada

Respondida
Fitting Data to Circle (Data is only a small cutout of a circle)
For this case I think you'll have to put in some work. The radius of your circle is clearly very large if we're to judge from th...

más de 5 años hace | 0

| aceptada

Respondida
How to round a value to the nearest value in an array?
At the file exchange I quickly found a couple of contributions that allows rounding to some desired precision. For this case cou...

más de 5 años hace | 0

Respondida
Flip and rotate matrix
In my experience, it is best to test whether the flipping and rotation operations commute with a small enough example - do it wi...

más de 5 años hace | 0

Respondida
bar plot with errorbars
Go to the FEX and look for "bar errorbar". I found these three, either of them should do what you want: errorbar_groups, matbar...

más de 5 años hace | 1

Respondida
Detecting central blob in image while discarding noisy pixels
Perhaps it would be possible to fit a sum of 2-D Gaussians (2-3-4?) to your images using some robust norm (huber-like with an ad...

más de 5 años hace | 0

| aceptada

Respondida
Hampel Matlab vs R
You seem to use different filter lengths in your call to hampel in matlab (30 - which I take to mean you will get a window of 2*...

más de 5 años hace | 0

Cargar más