Answered

Is it possible to generate a sine wave like this? I tried combining 50hz, 100hz and 200hz together but I did not get something like this picture that I provided here.

Yes it is possible. You will have to make the phase-angle match at the frequency transitions (for simplicity make the time-windo...

Is it possible to generate a sine wave like this? I tried combining 50hz, 100hz and 200hz together but I did not get something like this picture that I provided here.

Yes it is possible. You will have to make the phase-angle match at the frequency transitions (for simplicity make the time-windo...

2 months ago | 1

| accepted

Answered

two consequtive cursor's position in a while loop

Just after you have extracted and exported x in your while-loop you now have the next x-previous, so just stack that one away. S...

two consequtive cursor's position in a while loop

Just after you have extracted and exported x in your while-loop you now have the next x-previous, so just stack that one away. S...

2 months ago | 1

| accepted

Answered

How to build a 3D chart/plot from scattered/raw data?

If you have a dense enough sampling you could use the scatteredInterpolant to get interpolated values at a regular grid and then...

How to build a 3D chart/plot from scattered/raw data?

If you have a dense enough sampling you could use the scatteredInterpolant to get interpolated values at a regular grid and then...

2 months ago | 0

Answered

Plot deviation of curve as shaded area inside

Have a look at the file exchange. There there are multiple "shaded-error-plots". For example (without ordering of merit): jackk...

Plot deviation of curve as shaded area inside

Have a look at the file exchange. There there are multiple "shaded-error-plots". For example (without ordering of merit): jackk...

2 months ago | 0

Answered

Solving Linear Systems for Multibody Systems

As best I can interpret your flow-chart it seems that it ought to be "reasonably straightforward" to follow Torsten's advice by ...

Solving Linear Systems for Multibody Systems

As best I can interpret your flow-chart it seems that it ought to be "reasonably straightforward" to follow Torsten's advice by ...

2 months ago | 0

| accepted

Answered

finding the orthogonal vectors for a series of vectors

This is how I would do it: nVecs = 12 allVecs = randn(nVecs,3); for i1 = size(allVecs,1):-1:1 u_test = randn(1,3); whil...

finding the orthogonal vectors for a series of vectors

This is how I would do it: nVecs = 12 allVecs = randn(nVecs,3); for i1 = size(allVecs,1):-1:1 u_test = randn(1,3); whil...

2 months ago | 1

| accepted

Answered

Is there a way to deconvolute this peak, without knowing the convoluting peaks?

You might get some part of the way with deconvblind, from the image processing toolbox, so check the help and documentation to t...

Is there a way to deconvolute this peak, without knowing the convoluting peaks?

You might get some part of the way with deconvblind, from the image processing toolbox, so check the help and documentation to t...

2 months ago | 0

| accepted

Answered

Deleting every 2nd element of a cell array.

If you want to delete every odd row you do this: X(1:2:end,:) = []; If you want to delete every even element you do this: X(2...

Deleting every 2nd element of a cell array.

If you want to delete every odd row you do this: X(1:2:end,:) = []; If you want to delete every even element you do this: X(2...

2 months ago | 0

| accepted

Answered

casting without rounding using coder

Well, the only interpretation I can thing of that matches the "casting without rounding" in a sensible way is: ind = int32(...

casting without rounding using coder

Well, the only interpretation I can thing of that matches the "casting without rounding" in a sensible way is: ind = int32(...

3 months ago | 0

Answered

Find minors of a rectangular matrix

As far as I understand this one definition of generating one k-minor from an arbitrary matrix of size n-by-m is to select k rows...

Find minors of a rectangular matrix

As far as I understand this one definition of generating one k-minor from an arbitrary matrix of size n-by-m is to select k rows...

3 months ago | 0

Answered

How to create a rectangular pulse train of amplitude '1' with user-defined time period?

You should be able to do that with the square function, check its help and documentation. You might need to add 1 and divide by ...

How to create a rectangular pulse train of amplitude '1' with user-defined time period?

You should be able to do that with the square function, check its help and documentation. You might need to add 1 and divide by ...

3 months ago | 0

Answered

Make spectrogram of LFP using chronux package

From the help of that function you will see that the output S should be: 0050 % S (spectrum in form time x frequenc...

Make spectrogram of LFP using chronux package

From the help of that function you will see that the output S should be: 0050 % S (spectrum in form time x frequenc...

3 months ago | 0

| accepted

Answered

How to homogeneous two different images into same color after image stitching

You should have some good use for the histogram-matching contributions found on the file exchange. For example: https://se.math...

How to homogeneous two different images into same color after image stitching

You should have some good use for the histogram-matching contributions found on the file exchange. For example: https://se.math...

3 months ago | 0

Answered

Create a cell array containing the first 3 doubles from another cell array

Would: ThreeFirst = cell2mat(CCC(1:3)); do the trick?

Create a cell array containing the first 3 doubles from another cell array

Would: ThreeFirst = cell2mat(CCC(1:3)); do the trick?

3 months ago | 1

Answered

Finding Maximum Consecutive Dry Days in Daily Rainfall Data

Don't do it with loops, that is a lot of work. Use the vectorized functions to your advantage. Here's how to get at it with usin...

Finding Maximum Consecutive Dry Days in Daily Rainfall Data

Don't do it with loops, that is a lot of work. Use the vectorized functions to your advantage. Here's how to get at it with usin...

3 months ago | 0

| accepted

Answered

How to make 2D matrix from 3D matrix to solve 2D nonlinear system?

For the interior of your grid you can rather easily calculate the Laplacian operator something like this: NperSide = 50; [x,y,...

How to make 2D matrix from 3D matrix to solve 2D nonlinear system?

For the interior of your grid you can rather easily calculate the Laplacian operator something like this: NperSide = 50; [x,y,...

3 months ago | 0

| accepted

Answered

operating Matlab via Ubuntu terminal

It should be possible to do things like this from any standard unix-terminal: $ matlab -nodesktop -nosplash -r YOUR-SCRIPT You...

operating Matlab via Ubuntu terminal

It should be possible to do things like this from any standard unix-terminal: $ matlab -nodesktop -nosplash -r YOUR-SCRIPT You...

3 months ago | 0

Answered

Value dash outside a 2D plot

You can do this: set(gca,'TickDir','out') HTH

Value dash outside a 2D plot

You can do this: set(gca,'TickDir','out') HTH

3 months ago | 0

Answered

Creating a graph with error bars

You can use the errorbar function for plots like this. Check the help and documentation for that function. If that function does...

Creating a graph with error bars

You can use the errorbar function for plots like this. Check the help and documentation for that function. If that function does...

3 months ago | 0

Answered

How to extract values within a circular region from a griddata?

You "simply" only ask for the values inside that circular region. You can do it at least two different ways: N = 100; xv = lin...

How to extract values within a circular region from a griddata?

You "simply" only ask for the values inside that circular region. You can do it at least two different ways: N = 100; xv = lin...

3 months ago | 0

| accepted

Answered

2 equations, 2 unknowns - fminsearch(), fminunc() applied on numerical data

From your description you have 800-by-1300 linear equations of the type: a + x = b + y and you want to solve for both x and y....

2 equations, 2 unknowns - fminsearch(), fminunc() applied on numerical data

From your description you have 800-by-1300 linear equations of the type: a + x = b + y and you want to solve for both x and y....

3 months ago | 0

| accepted

Answered

Local variance estimation for image filtering

You get that result because medfilt2 will select the median value of the pixel-intensities of your region, and completely discar...

Local variance estimation for image filtering

You get that result because medfilt2 will select the median value of the pixel-intensities of your region, and completely discar...

3 months ago | 0

| accepted

Answered

How to read the coordinated from the plot in MATLAB 2018 version?

If you make a simple graph: ph = plot(X,Y); Then you can always extract the data-points from the plot-handle ph: xGraph = get...

How to read the coordinated from the plot in MATLAB 2018 version?

If you make a simple graph: ph = plot(X,Y); Then you can always extract the data-points from the plot-handle ph: xGraph = get...

3 months ago | 0

Answered

How to calculate the L2 (Euclidean) and L1 (cityblock, or we say Manhattan distance) distance based on longitude and latitude?

It seems to me that there is no obvious good definition of a Manhattan-distance on a spherical surface (even less so on a geoid)...

How to calculate the L2 (Euclidean) and L1 (cityblock, or we say Manhattan distance) distance based on longitude and latitude?

It seems to me that there is no obvious good definition of a Manhattan-distance on a spherical surface (even less so on a geoid)...

3 months ago | 0

| accepted

Answered

Colorbars belonging to more than one subplot/axis

perhaps something like this: figure(1) cx_12 = [min(min(var1(:)),min(var2(:))),max(max(var1(:)),max(var2(:)))]; cx_34 = [min(...

Colorbars belonging to more than one subplot/axis

perhaps something like this: figure(1) cx_12 = [min(min(var1(:)),min(var2(:))),max(max(var1(:)),max(var2(:)))]; cx_34 = [min(...

3 months ago | 0

| accepted

Answered

Processing large matrix faster

This ought to be done in one go: coods = M(:,M(:,3)<-80); In the case you cannot do it in a vectorized way and cannot determ...

Processing large matrix faster

This ought to be done in one go: coods = M(:,M(:,3)<-80); In the case you cannot do it in a vectorized way and cannot determ...

3 months ago | 0

Answered

From char to double for plotting

First you should store the data-sets in some kind of array. For the most tolerant storage (that doesn't care about different dim...

From char to double for plotting

First you should store the data-sets in some kind of array. For the most tolerant storage (that doesn't care about different dim...

4 months ago | 1

| accepted

Answered

Find 2D intersection in lat lon between curve (rivers) and satellite traces (2D polygon) on a map

If you have a single-pass of the satellite you could check what "river-points" are inside the ground-track with the inpolygon fu...

Find 2D intersection in lat lon between curve (rivers) and satellite traces (2D polygon) on a map

If you have a single-pass of the satellite you could check what "river-points" are inside the ground-track with the inpolygon fu...

4 months ago | 0

Answered

Is there a way in MATLAB to guess the values of a matrix just like in the EES software?

You can easily initialize your variable to a fixed-valued array: a = 17; t = 16.05*ones([1,round(a)]); If you want a function...

Is there a way in MATLAB to guess the values of a matrix just like in the EES software?

You can easily initialize your variable to a fixed-valued array: a = 17; t = 16.05*ones([1,round(a)]); If you want a function...

4 months ago | 0

Answered

Mass of a wire in shape of helix

The symbolic tools make the default interpretation that all variables are complex. Therefore it cannot make that simplification....

Mass of a wire in shape of helix

The symbolic tools make the default interpretation that all variables are complex. Therefore it cannot make that simplification....

4 months ago | 0