답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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*...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 1

답변 있음
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: ...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 2

| 수락됨

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

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 1

답변 있음
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...

7년 초과 전 | 4

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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; ...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 1

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 1

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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*...

7년 초과 전 | 0

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

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 1

더 보기