Answered

Reduce padding around saved image

If you save your edge-enhanced image with something like print -dpng your-image.png you can increase the fraction of your imag...

Reduce padding around saved image

If you save your edge-enhanced image with something like print -dpng your-image.png you can increase the fraction of your imag...

12 days ago | 0

Answered

Solving an ODE in matlab

First thing you should learn/revise/refresh is how to convert higher-order ODEs to sets of coupled first-order ODEs. You have a...

Solving an ODE in matlab

First thing you should learn/revise/refresh is how to convert higher-order ODEs to sets of coupled first-order ODEs. You have a...

21 days ago | 1

Answered

Potting Cross-section of an image

First you need to figure out the size of your image - whethre it is an intensity-image or an rgb-image: imsz = size(img); Once...

Potting Cross-section of an image

First you need to figure out the size of your image - whethre it is an intensity-image or an rgb-image: imsz = size(img); Once...

21 days ago | 0

Answered

Help solving this 2d pde

You are in luck! Matlab provides you with a (rather hidden) method to give you the 2-D Laplacian in matrix form. Have a look at ...

Help solving this 2d pde

You are in luck! Matlab provides you with a (rather hidden) method to give you the 2-D Laplacian in matrix form. Have a look at ...

22 days ago | 0

Answered

Dynamic spectra for 1000 files

It is unclear what data you have in your files. Is it frquency and power-spectra from spectrum analyzer? If so then you can simp...

Dynamic spectra for 1000 files

It is unclear what data you have in your files. Is it frquency and power-spectra from spectrum analyzer? If so then you can simp...

26 days ago | 0

| accepted

Answered

How to convert video into frames?

Look at the help for VideoReader and especially VideoReader/read, that contains an example of how to extract frames from a video...

How to convert video into frames?

Look at the help for VideoReader and especially VideoReader/read, that contains an example of how to extract frames from a video...

26 days ago | 0

Answered

how to input a matrix into a function HELPPP

It sounds as if your new to matlab. If so welcome. Good advice then is to point you to introduction tutorials etc. If you have ...

how to input a matrix into a function HELPPP

It sounds as if your new to matlab. If so welcome. Good advice then is to point you to introduction tutorials etc. If you have ...

26 days ago | 0

| accepted

Answered

problems understanding pspectrum function

The help and documentation to the spectrogram function might be a bit more extensive when it comes to the input parameters you a...

problems understanding pspectrum function

The help and documentation to the spectrogram function might be a bit more extensive when it comes to the input parameters you a...

28 days ago | 0

Answered

Plot system of equations

Take it step-by-step. Take pen and paper. Plot a cartesian coordinate system with x1 and x2 at the axes. For 1.6 you have 2 li...

Plot system of equations

Take it step-by-step. Take pen and paper. Plot a cartesian coordinate system with x1 and x2 at the axes. For 1.6 you have 2 li...

28 days ago | 1

Answered

How can I get the top and bottom envelopes of a signal?

You go to the file exchange and search for envelope. This gave me 157 hits, and should give you the same number of hits, some of...

How can I get the top and bottom envelopes of a signal?

You go to the file exchange and search for envelope. This gave me 157 hits, and should give you the same number of hits, some of...

29 days ago | 0

Answered

difficulty in solving integration of a function

Implement the functions x(t,theta), y(t,theta,H) and F(t,H,p,theta) step-by step. Something like this: y = @(t,theta,H) H+50*si...

difficulty in solving integration of a function

Implement the functions x(t,theta), y(t,theta,H) and F(t,H,p,theta) step-by step. Something like this: y = @(t,theta,H) H+50*si...

30 days ago | 0

| accepted

Answered

Hi every one , I need help about:

In order to determine this you need at least one additional piece of information. The camera converts light from incidence angle...

Hi every one , I need help about:

In order to determine this you need at least one additional piece of information. The camera converts light from incidence angle...

1 month ago | 1

| accepted

Answered

ode solver , restart from where the simulation ended

Just extract the solution at 1 s from s (i.e. the last row in s). Then simly run the integration from there: t2 = linspace(1,3,...

ode solver , restart from where the simulation ended

Just extract the solution at 1 s from s (i.e. the last row in s). Then simly run the integration from there: t2 = linspace(1,3,...

1 month ago | 0

| accepted

Answered

Spring mass system subjected to impulse excitation

You seem to have misunderstood how matlab integrates ODEs. Your ODE-function, impulse, should return the derivatives, and , at...

Spring mass system subjected to impulse excitation

You seem to have misunderstood how matlab integrates ODEs. Your ODE-function, impulse, should return the derivatives, and , at...

1 month ago | 0

Answered

Is It Necessary to Select an Odd Span for Smoothing Data Using Moving Average Filter?

You can check what happens when smooting by averaging over an even number of points. simply use convolution to carry out the ave...

Is It Necessary to Select an Odd Span for Smoothing Data Using Moving Average Filter?

You can check what happens when smooting by averaging over an even number of points. simply use convolution to carry out the ave...

1 month ago | 0

Answered

dispersion relation normalization ion acoustic

Expand the definitions of and . Then you get a proper expression for the ion-accoustic dispersion relation. To plot it in some ...

dispersion relation normalization ion acoustic

Expand the definitions of and . Then you get a proper expression for the ion-accoustic dispersion relation. To plot it in some ...

1 month ago | 0

Answered

Convert interpolation function to symbolic

You already get a piecewise polynomial out of pchip. That is a symbolic function - though not on the form expected by the symbol...

Convert interpolation function to symbolic

You already get a piecewise polynomial out of pchip. That is a symbolic function - though not on the form expected by the symbol...

2 months ago | 1

| accepted

Answered

How to get a value from inside a function?

So we know something about your functions, but not much more than the most general stuff. If you write your function fun_a somet...

How to get a value from inside a function?

So we know something about your functions, but not much more than the most general stuff. If you write your function fun_a somet...

2 months ago | 1

| accepted

Answered

how to extract variables from ode45

My pedestrian-layman approach to this type of problem is to integrate the ODE, typically with t = t0:dt:tend, then when I have y...

how to extract variables from ode45

My pedestrian-layman approach to this type of problem is to integrate the ODE, typically with t = t0:dt:tend, then when I have y...

2 months ago | 0

Answered

Infinite recursion in code to graph second order differential equations

Let's analyse what's happening here. When you call odefcn from the command-line 1, the first thing matlab does is to overwrit...

Infinite recursion in code to graph second order differential equations

Let's analyse what's happening here. When you call odefcn from the command-line 1, the first thing matlab does is to overwrit...

2 months ago | 0

| accepted

Answered

Scatter 2D plot with specific colorbar

You can try something like this: imagesc % Just to get something to show axP = get(gca,'position'); % Create axes for colorba...

Scatter 2D plot with specific colorbar

You can try something like this: imagesc % Just to get something to show axP = get(gca,'position'); % Create axes for colorba...

2 months ago | 0

| accepted

Answered

whats is presice compute time in matlab

These fluctuations are "kind of expected", your computer does a lot of other stuff in addition to running matlab which gives the...

whats is presice compute time in matlab

These fluctuations are "kind of expected", your computer does a lot of other stuff in addition to running matlab which gives the...

2 months ago | 0

Answered

FFT of sine wave shows unexpected spectral widening

Try this: subplot(1,2,1) plot(templeS) axis tight ax = axis; axis([[-30 0]+ax(2) ax(3:4)]) subplot(1,2,2) axis tight ...

FFT of sine wave shows unexpected spectral widening

Try this: subplot(1,2,1) plot(templeS) axis tight ax = axis; axis([[-30 0]+ax(2) ax(3:4)]) subplot(1,2,2) axis tight ...

2 months ago | 0

| accepted

Answered

Add n days to juliandate

It seems to work just fine as far as I can see. When I compare: jd0 = juliandate(2020, 2, 14); jd0p100 =juliandate(2020, 2, 14...

Add n days to juliandate

It seems to work just fine as far as I can see. When I compare: jd0 = juliandate(2020, 2, 14); jd0p100 =juliandate(2020, 2, 14...

2 months ago | 0

Answered

How to find the best parameters to fit damped oscillations curves

If you plot your data you should be able to see that the zero-crossings are increasingly further apart. That means that your mo...

How to find the best parameters to fit damped oscillations curves

If you plot your data you should be able to see that the zero-crossings are increasingly further apart. That means that your mo...

2 months ago | 1

Answered

How can I improve code efficiency?

First step of improving code is to run the scripts and functions with the profiler on (seel documentation and help for profile) ...

How can I improve code efficiency?

First step of improving code is to run the scripts and functions with the profiler on (seel documentation and help for profile) ...

2 months ago | 0

Answered

Some question about a special code for solving an ODE system by Runge-Kutta method

Since u1 and u2 depends on p1, p2 and p3, that in turn will depend on time, you have 6 coupled ODEs. The best(?) way to solve th...

Some question about a special code for solving an ODE system by Runge-Kutta method

Since u1 and u2 depends on p1, p2 and p3, that in turn will depend on time, you have 6 coupled ODEs. The best(?) way to solve th...

2 months ago | 0

| accepted

Answered

Curve fitting of a custom equation with a predefined value

For this type of problems I typically use the basic optimization-functions of matlab - either fminsearch or lsqnonlin depending ...

Curve fitting of a custom equation with a predefined value

For this type of problems I typically use the basic optimization-functions of matlab - either fminsearch or lsqnonlin depending ...

2 months ago | 0

| accepted

Answered

how to get eigenvalues of a function matrix?

To calculate the eigenvalues of H you have to chose, either to use your implementation where H is a handle to a function returni...

how to get eigenvalues of a function matrix?

To calculate the eigenvalues of H you have to chose, either to use your implementation where H is a handle to a function returni...

3 months ago | 0

| accepted

Answered

How do I create a new folder each time I run a code?

This is easily solved: dirname = fullfile(path_2_root_dir,sprintf('NewFolder-%s',datestr(now,'yyyymmdd-HHMMSS'))); mkdir(dirna...

How do I create a new folder each time I run a code?

This is easily solved: dirname = fullfile(path_2_root_dir,sprintf('NewFolder-%s',datestr(now,'yyyymmdd-HHMMSS'))); mkdir(dirna...

4 months ago | 0