Answered
How can I draw a kurdistan flag in matlab?
You can add something like this: phi360 = linspace(0,2*pi,43); r = 60 + 25*(-1).^(1:43); phi3...

5 years ago | 0

Answered
how to solve error occuring in underlined part?
Run this code, but set the debug condition to stop at errors: dbstop if error Then you'll get a debug-propmt at the line where...

5 years ago | 1

Answered
How can I do the image stitching with constant overlap area?
Something like this works for a smallish toy-example: % Read image Im = imread('cameraman.tif'); % Generate some tiles with a...

5 years ago | 0

| accepted

Answered
How do I convert fractional display to decimal display ?
You might have set format to rat somewhere, perhaps in a startup.m or the like. You could get back to more normal decimal output...

5 years ago | 0

Answered
How to use interpolation instead of integrating in chunks with ODE45?
Too long code. But this is what I use for cases where I have to integrate ODEs with time-varying data for one parameter: functi...

5 years ago | 1

| accepted

Answered
Solving Complex Line Integrals
Wouldn't it be simplest to just multiply the radius of the polar representation of your unit-circle with the desired radius? g ...

5 years ago | 2

| accepted

Answered
Integration with piecewise function
Doesn't this work: C_v4 = @(T) 0.0516*T.^3.*double(T<=0.6) + .432*T.^6.7.*double(0.6<T).*double(T<1.1) + 0.468*T.^5.6.*double(1...

5 years ago | 0

| accepted

Answered
Solve a set of ODEs with given initial conditions and final conditions
To me this seems to be a problem that the shooting-method would be suited for. That will require you to solve the problem multip...

5 years ago | 1

Answered
Matlab 2020a X11 forwarding crash
Perhaps the best solution is to run maltab in a VNC-vewer. That way you would avoid matlab having to rely on the X11 forwarding ...

5 years ago | 0

Answered
Fitting nonlinear noisy data
When I do this I typically write my own error-function or residual-function and then use fminsearch (or some of the general opti...

5 years ago | 0

Answered
Alternate form of eval function
You'll have to learn good programming-habits and utilise the vectorized capabilities of matlab. This looks like a case where you...

5 years ago | 0

| accepted

Answered
How to convert complex one sided spectrum into time domain
You can do something like this: function fft4real = symmetrize(fftOnesided) fft4real = [fftOnesided,0, fliplr(conj(fftOnesided...

5 years ago | 0

| accepted

Answered
add Int8 and int16
Think about what input variables you have, what type they have and which one you need to cast to another data-type.

5 years ago | 0

Answered
how to add 2d plot in 3d?
I'd do something like this: clf surf(t,x,U+3,U),shading flat hold on pcolor(t,x,U),shading flat ax1 = gca; ax2 = axes('pos...

5 years ago | 0

Answered
Transform 3D point cloud
If you have a 3-x-n array of point-coordinates you can rotate them in 2 ways, either rotate the points or the coordinate system....

5 years ago | 1

Answered
How to apply the loop index on the output (filename) of the sprintf function?
In your "workspace" panel you see the values (sizes) of the variables as they are after completing the loop. Your filname-variab...

5 years ago | 0

| accepted

Answered
Calculate mean of a matrix with different indices
So you effectively have different number of dx for each k? If so I'd do this something like this: angleradian2 = nan([MaxNrRows...

5 years ago | 0

| accepted

Answered
How to 'Mirror Image' my Vectors
If your yellow point-markers are supposed to lie on/in/over the stream (river?) then you might have to either rotate their coord...

5 years ago | 0

| accepted

Answered
How to get the FFT peaks from a non stationary signal
What you seem to attempt is nothing but extracting peaks out of ffts from sequences of shorter time-span. That ought to be exact...

5 years ago | 1

| accepted

Answered
Getting imaginary values for unequal spaced Gaussian function using NUFFT
If you take a look at what you work with: subplot(3,1,2) plot(real(f_k)) hold on plot(imag(f_k)) plot(abs(f_k)) su...

5 years ago | 0

Answered
MATLAB map and reduce: functional programming
You could get parts of the way with cellfun and arrayfun, typically in combination with anonymous functions (fcn = @(x) sin(x))....

5 years ago | 0

| accepted

Answered
Confidence intervals for fitting parameters in a system of ODEs?
Your model-function seems to produce the residuals, , between modeled and observed concentrations. At the optimal values you ge...

5 years ago | 1

Answered
I need to speedup saving spectrogram images
Maybe you get some speedup by using print instead of exportgraphics. You can at least try and check that: ...as above print('-...

5 years ago | 0

Answered
How to write ||a-p||^2 in matlab code
Have a look at the norm function and its help and documentation. If your a and p are  [n x m] arrays and you want to get ||a-p||...

5 years ago | 0

| accepted

Answered
how can save different plot with different names file in loop use fullfile ?
Simply modify the filename: for idx_loop = % whatever you have ... ... spectrogram(M1,'yaxis') ...

5 years ago | 0

| accepted

Answered
how to filter noise from geomagnetic data?
You simply have to try. You could use standard linear filters (see the help and documentation for filtfilt or conv), you might u...

5 years ago | 0

Answered
Input signal and arguments in Ode45. Not enough imput arguments
The function dinamica expects 6 input arguments. However, the function, f that ode45 takes as input is handled as a function of ...

5 years ago | 0

| accepted

Answered
Differential model won't calculate with powers <1
It is not given that a general nonlinear system of ODEs have analytical solutions. If you cannot get the symbolic toolbox to fin...

5 years ago | 0

| accepted

Answered
Response to an impulse(delta dirac)
That's not what I understand a Dirac-pulse to be. This is a 2 second long constant-force push. Implement it as such - on for 2 s...

5 years ago | 0

| accepted

Answered
ODE - Save variables for every time step
This is something that is (simplest?) done by calculating the second output once after you've integrated the ODE-system. Either ...

5 years ago | 1

Load more