Respondida
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...

alrededor de 7 años hace | 0

| aceptada

Respondida
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...

alrededor de 7 años hace | 0

Respondida
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*...

alrededor de 7 años hace | 0

Respondida
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...

alrededor de 7 años hace | 1

Respondida
Parse Error in funtion
Simples, k++ is not valid matlab syntax, sadly according to some, but fact. You'll have to do an excplicit incrementations: ...

alrededor de 7 años hace | 0

| aceptada

Respondida
imwarp large image running out of memory
Maybe you can get weasle your way around the problem by divide-and-conquer? Would it work if you applied your warping on a sub-s...

alrededor de 7 años hace | 0

Respondida
Plot a Contour with no zigzag
If you have access to the spap2 you could try that function, I'd take a stab at converting your contour-data from Cartesian [X,Y...

alrededor de 7 años hace | 0

Respondida
How to perform a truncated SVD
That was an uggly uggly G-matrix. When solving inverse problems the truncation-point is not to be selected close to "at double-p...

alrededor de 7 años hace | 2

| aceptada

Respondida
need help about coherence filter
Have a look at the excellent nonlinear-diffusion-toolbox. It contains functions for coherence-enhancing non-linear diffusion fil...

alrededor de 7 años hace | 0

Respondida
Multiple EEG-files to one spectrogram
If there is time-gaps in your data-sequence, just do the individual spectrograms as per usual, I'd use something like this: dat...

alrededor de 7 años hace | 1

Respondida
Figures with large amounts of data don't export properly to .eps
The solution to avoid this arbitrary choise of output renderer is to explicitly select painters: print('-depsc2','-painters',fi...

alrededor de 7 años hace | 4

| aceptada

Respondida
Saving all the variables from an ode45 Function
It seems your w is a scalar, and you've defined Yi11 and Yi12 as global constants (warnings should come but I'll assume you have...

alrededor de 7 años hace | 0

Respondida
How do I name the trendline in the legend? Also, how can I get the trend line equation on the plot?
Maybe: if c(2) > 0 equation_string = sprintf('%4.3f x + %4.3f',c(1),c(2)); elseif c(2) < 0 equation_string = sprintf('%4...

alrededor de 7 años hace | 0

Respondida
Fitting Lennard-Jones to Morse
First you need to make these potentials comparable - now your LJ12-6 has the dissociation-energy as the zero-level, while your M...

alrededor de 7 años hace | 0

| aceptada

Respondida
How do I ensure that the animation remain within the axis limit?
Well you could achieve that by doing something like: plot(p(1,:),p(2,:),'k.','LineWidth',3,'Markersize',15); axPcurr = axis; ...

alrededor de 7 años hace | 0

| aceptada

Respondida
Plotting coastlines at different levels in a 3D plot
Since you've selected to set zdir to 'reverse' your coastline-plot might look better something like this: z_bottom = max(get(gc...

alrededor de 7 años hace | 1

| aceptada

Respondida
How to view the Frequency content of an image
Try something like: ftI = fft2(I); imagesc(log10(abs(ftI))) caxis([-6 0]+max(caxis)) Then you have the DC-component in the u...

alrededor de 7 años hace | 0

Respondida
How can I call the variables of MATLAB workspace from a function?
I suppose you can build something with the matlab-function evalin, Something like: savename = 'whatever.mat'; savecmd = ['save...

alrededor de 7 años hace | 1

Respondida
legendre function of second kind
You can find a toolbox for special functions on the file exchange: Computation of Special Functions I haven't (or at least don...

alrededor de 7 años hace | 0

Respondida
How do I save every nth Frame of a video and save these images to a folder of my choosing
If you follow the steps from the help on VideoReader, it should be perfectly possible to replace the frame-by-frame reading des...

alrededor de 7 años hace | 0

| aceptada

Respondida
find index values in a 3D matrix above a threshold
To find indices to values larger than 1 do: [i1,i2,i3] = find(A>threshold); After that you might have to loop over the indices...

alrededor de 7 años hace | 0

Respondida
Using ginput with imshow: how to save pixel instead of axis coordinates
Not directly from ginput. You can easily do whatever rounding of the coordinates you've chosen directly after: [x,y] = ginput(2...

alrededor de 7 años hace | 0

| aceptada

Respondida
Adding noise to hyperspectral image (.mat file)
Gaussian blur is just a convolution of your image with a 2-D Gaussian PSF for normal images (for an RGB image it might be slight...

alrededor de 7 años hace | 0

Respondida
How to plot vector time series
Sure you can try speed and wind direction as time-series: subplot(2,1,1) plot(t,atan2(u,v)) subplot(2,1,2) plot(t,(u.^2+v.^2...

alrededor de 7 años hace | 0

| aceptada

Respondida
Acoustic modes in a room, standing wave pattern with nodes and anti-nodes.
Use meshgrid to build 3-D arrays for x y and z: X = 0:0.1:lx; Y = 0:0.1:ly; Z = 0:0.1:lz; [X,Y,Z] = mehsgrid(X,Y,Z); P = A*...

alrededor de 7 años hace | 0

Respondida
Please help me make this function periodic
Write a function for that pulse shape, then have a look at the pulstran function. HTH

alrededor de 7 años hace | 0

Respondida
how to get the inverse of a symmetric matrix and ensure accurancy
If you want an inverse that is nice in that sense you could always simply do an eigenvalue decomposition of F. Then the eigenval...

alrededor de 7 años hace | 0

Respondida
Scanning the Object in Parts and Image Reconstruction
To avoid the having non-illuminated black spots you cant move the light-source the full diameter in the horizontal direction, ti...

alrededor de 7 años hace | 0

| aceptada

Respondida
How to judge polyfit output is correct or not?
Today my crystal ball is very clear (head not) so I see a good answer to this age old question. Since you have a very large n...

alrededor de 7 años hace | 0

| aceptada

Respondida
Saving .mat file with different names
You can use the functional form of save: X = data_of_interest1; Y = data_of_interest2; % and save_name = sprintf('NH_%03d_%0...

alrededor de 7 años hace | 1

Cargar más