Answered

"Go to" alternative

Yeah, write your wanted input and allocation-arrays for a couple of steps. Something like: f = [1 2 3 4]; S_from_f = {[1],[2,3...

"Go to" alternative

Yeah, write your wanted input and allocation-arrays for a couple of steps. Something like: f = [1 2 3 4]; S_from_f = {[1],[2,3...

2 Tage ago | 0

Answered

hi , i am very new to matlab so i have a probeme , whenerver i run the function below i get that the input which is matrix is undefined , i load the matrix in my current folder but the error still

In your base workspace you should load the Adj-matrix and call your function with that as input: load Adj.mat Adj % The last Ad...

hi , i am very new to matlab so i have a probeme , whenerver i run the function below i get that the input which is matrix is undefined , i load the matrix in my current folder but the error still

In your base workspace you should load the Adj-matrix and call your function with that as input: load Adj.mat Adj % The last Ad...

2 Tage ago | 0

Answered

how do i plot number of iteration verses accuracy

Something like this should be doable: i_iterations_to_try = [10:5:200].^2; % Some array with number of iterations to run throug...

how do i plot number of iteration verses accuracy

Something like this should be doable: i_iterations_to_try = [10:5:200].^2; % Some array with number of iterations to run throug...

10 Tage ago | 1

Answered

how to solve a trigonometric equations

If you are a matlab-beginner I suggest you read through the getting started-type documentation, that you work yourself through d...

how to solve a trigonometric equations

If you are a matlab-beginner I suggest you read through the getting started-type documentation, that you work yourself through d...

10 Tage ago | 0

Answered

Smooth contours of a colormap

Why do you want your contours to be smooth? You have some idea that the surface doesn't have corner-like edges where slopes in d...

Smooth contours of a colormap

Why do you want your contours to be smooth? You have some idea that the surface doesn't have corner-like edges where slopes in d...

11 Tage ago | 0

Answered

how can I read .dat file

What is the data format? Do you have a file? Is it reasonably sized? Could you share it? If you type: more gsmap_rnl.20010101....

how can I read .dat file

What is the data format? Do you have a file? Is it reasonably sized? Could you share it? If you type: more gsmap_rnl.20010101....

11 Tage ago | 0

Answered

regarding Fourier transform of sinc function

Well, before plotting try to check what your variable fy is: whos fy Then when you see that it is a complex variable you have ...

regarding Fourier transform of sinc function

Well, before plotting try to check what your variable fy is: whos fy Then when you see that it is a complex variable you have ...

11 Tage ago | 0

| accepted

Answered

How to draw line between specific points?

For the first time around your loop you plot: plot(data(1, 1:2), data(1, 3:4)); % i.e. plot(A(1,:),B(1,:)) that corresponds...

How to draw line between specific points?

For the first time around your loop you plot: plot(data(1, 1:2), data(1, 3:4)); % i.e. plot(A(1,:),B(1,:)) that corresponds...

11 Tage ago | 0

| accepted

Answered

Is it possible to send plots to multiple computers from the same matlab session in Linux?

KISS: vnc

Is it possible to send plots to multiple computers from the same matlab session in Linux?

KISS: vnc

11 Tage ago | 0

Answered

How can I have multiple colormaps in single map using mapping toolbox?

Give freezecolors a try, it has solved similar problems before, though not completely without fail. HTH

How can I have multiple colormaps in single map using mapping toolbox?

Give freezecolors a try, it has solved similar problems before, though not completely without fail. HTH

13 Tage ago | 0

Answered

diffusion equation with crank nickolson method

That doesn't look like C-N. Since C-N uses the values at t_i + dt/2 to calculate the gradients you end up with a system of equat...

diffusion equation with crank nickolson method

That doesn't look like C-N. Since C-N uses the values at t_i + dt/2 to calculate the gradients you end up with a system of equat...

13 Tage ago | 0

| accepted

Answered

"Spectrogram" - does it produce spectral amplitudes, or can it ONLY produce power spectral densities/amplitudes?

In my version of matlab I have to go down halfway through the help text - which is very goog to read - to find_: [S,F,T,P] = sp...

"Spectrogram" - does it produce spectral amplitudes, or can it ONLY produce power spectral densities/amplitudes?

In my version of matlab I have to go down halfway through the help text - which is very goog to read - to find_: [S,F,T,P] = sp...

16 Tage ago | 0

| accepted

Answered

Solving 2nd order ODE with ODE45

Dont bother with the hassle to go through symbolic-variables and ode2vectorfield when transforming your 2 clean 2nd-order ODEs. ...

Solving 2nd order ODE with ODE45

Dont bother with the hassle to go through symbolic-variables and ode2vectorfield when transforming your 2 clean 2nd-order ODEs. ...

18 Tage ago | 2

| accepted

Answered

Slice with temperature and position

To use slice you first have to re-interpolate your data to a regular 3-D grid. Depending on your matlab-version you can use: gri...

Slice with temperature and position

To use slice you first have to re-interpolate your data to a regular 3-D grid. Depending on your matlab-version you can use: gri...

19 Tage ago | 0

| accepted

Answered

Narrowband beamforming in transmission

In the direction of yor transmitted beam the waves from the different antennas have to interfere constructively. To achieve this...

Narrowband beamforming in transmission

In the direction of yor transmitted beam the waves from the different antennas have to interfere constructively. To achieve this...

19 Tage ago | 0

Answered

Add colorbar of colored plot on grayscale image

Something like this: % Assuming your grayscale image is: d in double format grayscaleIM(:,:,3) = (d-min(d(:)))/(max(d(:))-mi...

Add colorbar of colored plot on grayscale image

Something like this: % Assuming your grayscale image is: d in double format grayscaleIM(:,:,3) = (d-min(d(:)))/(max(d(:))-mi...

20 Tage ago | 1

| accepted

Answered

How can i smooth my contour map?

Have a look at these file-exchange contributions: contour-line-smoothing, Smoothing 2D-Contours Using Local Regression Lines. T...

How can i smooth my contour map?

Have a look at these file-exchange contributions: contour-line-smoothing, Smoothing 2D-Contours Using Local Regression Lines. T...

23 Tage ago | 0

Answered

reindexing a correlation matrix

If you want to reindex a correlation matrix you should maintain the correct correlation-structure - so you have to apply the sam...

reindexing a correlation matrix

If you want to reindex a correlation matrix you should maintain the correct correlation-structure - so you have to apply the sam...

etwa ein Monat ago | 0

Answered

Errorbars on scatter plot

You could use something like this function: function h = scatter_ellipse(X,Y,C,Cov,varargin) %SCATTER_ELLIPSE - colored ellips...

Errorbars on scatter plot

You could use something like this function: function h = scatter_ellipse(X,Y,C,Cov,varargin) %SCATTER_ELLIPSE - colored ellips...

etwa ein Monat ago | 0

Answered

Cumtrapz for matrix including NaN values

Well, I think that in addition to calculating a cummulative integration you also should/need to extract the limits over which yo...

Cumtrapz for matrix including NaN values

Well, I think that in addition to calculating a cummulative integration you also should/need to extract the limits over which yo...

etwa ein Monat ago | 0

| accepted

Answered

mean and Standard deviation of ratio of normal variables?

Well, you have the document to read. If that's not good enough there is always: Ratio-distributions (wikipedia), Distribution-...

mean and Standard deviation of ratio of normal variables?

Well, you have the document to read. If that's not good enough there is always: Ratio-distributions (wikipedia), Distribution-...

etwa ein Monat ago | 0

Answered

Deconvolution of a Convolved Gaussian and Expoential curve

To my understanding the deconv-functions work for evenly spaced data. In your case I'd either try to do the convolution analytic...

Deconvolution of a Convolved Gaussian and Expoential curve

To my understanding the deconv-functions work for evenly spaced data. In your case I'd either try to do the convolution analytic...

etwa 2 Monate ago | 0

| accepted

Answered

Plot data points as points when using 'errorbar'

Doesn't this work for you?: errorbar(x,y,e,'.-','markersize',18) HTH

Plot data points as points when using 'errorbar'

Doesn't this work for you?: errorbar(x,y,e,'.-','markersize',18) HTH

etwa 2 Monate ago | 0

| accepted

Answered

fitting a function with 3 parameter

This is a simple linear fitting problem, you solve it this way: M = [x(:),y(:),z(:)]; % creating a matrix of all your independe...

fitting a function with 3 parameter

This is a simple linear fitting problem, you solve it this way: M = [x(:),y(:),z(:)]; % creating a matrix of all your independe...

etwa 2 Monate ago | 0

Answered

How to change r code to Matlab

Well if it is as simple as a fit of a line to data you can always use polyfit, or lscov if you have known uncertainties in your ...

How to change r code to Matlab

Well if it is as simple as a fit of a line to data you can always use polyfit, or lscov if you have known uncertainties in your ...

etwa 2 Monate ago | 0

| accepted

Answered

Delete specific contour line from contour plot

It is not obvious to me which contour you want to remove, but if you don't want, for example the 0-level contour you do: contou...

Delete specific contour line from contour plot

It is not obvious to me which contour you want to remove, but if you don't want, for example the 0-level contour you do: contou...

etwa 2 Monate ago | 0

| accepted

Answered

how to interpolate x and y coordinates of contour?

You extract the contours wrong, at least if you have multiple contours at the same level v(i). It is simpler if you plot all the...

how to interpolate x and y coordinates of contour?

You extract the contours wrong, at least if you have multiple contours at the same level v(i). It is simpler if you plot all the...

etwa 2 Monate ago | 0

| accepted

Answered

How to superimpose images, making one of them transparent

Perhaps something like this: B = imread('peppers.png'); % Just to get a sample image subplot(2,2,1) imagesc(B) [i1,j2] = gin...

How to superimpose images, making one of them transparent

Perhaps something like this: B = imread('peppers.png'); % Just to get a sample image subplot(2,2,1) imagesc(B) [i1,j2] = gin...

etwa 2 Monate ago | 0

Answered

exponential function phase reversal

Try: phi = linspace(-5*pi,5*pi,5*360+1); Phi = angle(exp(1i*phi)); plot(phi,Phi) grid on set(gca,'XTick',[-2.5*360:180:2.5*...

exponential function phase reversal

Try: phi = linspace(-5*pi,5*pi,5*360+1); Phi = angle(exp(1i*phi)); plot(phi,Phi) grid on set(gca,'XTick',[-2.5*360:180:2.5*...

etwa 2 Monate ago | 0

Answered

Vectorizing nested for loops

You find a nice contribution from J Kirk on the file exchange: Distmat In my historic appreciation efforts there is this Acklam...

Vectorizing nested for loops

You find a nice contribution from J Kirk on the file exchange: Distmat In my historic appreciation efforts there is this Acklam...

etwa 2 Monate ago | 1