Réponse apportée
Scatter 2D plot with specific colorbar
You can try something like this: imagesc % Just to get something to show axP = get(gca,'position'); % Create axes for colorba...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
whats is presice compute time in matlab
These fluctuations are "kind of expected", your computer does a lot of other stuff in addition to running matlab which gives the...

plus de 6 ans il y a | 0

Réponse apportée
FFT of sine wave shows unexpected spectral widening
Try this: subplot(1,2,1) plot(templeS) axis tight ax = axis; axis([[-30 0]+ax(2) ax(3:4)]) subplot(1,2,2) axis tight ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Add n days to juliandate
It seems to work just fine as far as I can see. When I compare: jd0 = juliandate(2020, 2, 14); jd0p100 =juliandate(2020, 2, 14...

plus de 6 ans il y a | 0

Réponse apportée
How to find the best parameters to fit damped oscillations curves
If you plot your data you should be able to see that the zero-crossings are increasingly further apart. That means that your mo...

plus de 6 ans il y a | 1

Réponse apportée
How can I improve code efficiency?
First step of improving code is to run the scripts and functions with the profiler on (seel documentation and help for profile) ...

plus de 6 ans il y a | 0

Réponse apportée
Some question about a special code for solving an ODE system by Runge-Kutta method
Since u1 and u2 depends on p1, p2 and p3, that in turn will depend on time, you have 6 coupled ODEs. The best(?) way to solve th...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Curve fitting of a custom equation with a predefined value
For this type of problems I typically use the basic optimization-functions of matlab - either fminsearch or lsqnonlin depending ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how to get eigenvalues of a function matrix?
To calculate the eigenvalues of H you have to chose, either to use your implementation where H is a handle to a function returni...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How do I create a new folder each time I run a code?
This is easily solved: dirname = fullfile(path_2_root_dir,sprintf('NewFolder-%s',datestr(now,'yyyymmdd-HHMMSS'))); mkdir(dirna...

plus de 6 ans il y a | 0

Réponse apportée
Images don't show properly with imshow after certain calculation
When you do things like this the errors are always (in my experience) in different normalizations and type-castings. To work the...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Press " " to rename 4 instances of "VariableName1" to "VariableName2"
That ought to be the return key... HTH

plus de 6 ans il y a | 0

Réponse apportée
How to compute SVD of a matrix without using in-build SVD command?
So this is a homework task, right? (Unless you come up with a good reason this is the case everyone have to come to this conclus...

plus de 6 ans il y a | 0

Réponse apportée
analytical solution of ODEs
This should be done thisly: syms r syms T(r) dTdr = diff(T) d2Tdr2 = diff(T,2) T = dsolve(1*d2T+((1/r)*dT) ==1,T(0.005)==20...

plus de 6 ans il y a | 0

Réponse apportée
How to graphically/interactively select region of interest from 3D point cloud data
In newer versions of matlab there seems to be just such a feature, see: ROI.CUBOID For older versions of matlab (I vaguely rec...

plus de 6 ans il y a | 3

| A accepté

Réponse apportée
Obtaining a equation in two variables (x and y) from a set of data points
What you should do depends on your objective. If you very explicitly want a function you could use spap2 (and perhaps some of it...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Hello, we have received a Matlab code in school and the assignment is to explain what it means. I wonder if anybody could take us through the code and explain it?
At the matlab command-line prompt type: dpstop in nameiofscript where nameiofscript is the name of the script-file. Then you r...

presque 7 ans il y a | 0

Réponse apportée
How to obtain CDF from large dataset?
Have a look at the help and documentation of the function ksdensity - that is one way to do this with the least amount of assump...

presque 7 ans il y a | 0

Réponse apportée
Difference in frequency domain between mp3 and wav
There are some small differences. You should also try to compare the spectrograms of the two signals, see the help for spectrogr...

presque 7 ans il y a | 0

Réponse apportée
How to edit matlab saved file?
I think something like this should work: filename2edit = 'something.mat'; load(filename2edit,'X2change') X2change(3) = 12; s...

presque 7 ans il y a | 1

Réponse apportée
I would like to plot Histogram and relative frequencies from a given dada.txt. I already plot time series plot for the given data. KIndly help me to plot histogram and relative freqs.
Have a good look at the help and documentation of histogram function. It should let you solve this task easily. HTH

presque 7 ans il y a | 0

Réponse apportée
Solving 4th order ode problem
In general you convert a high-order ODE to a set of first order ODEs like in this example below (I will use a simple equation of...

presque 7 ans il y a | 0

Réponse apportée
partial differentating a matrix by a vector
Have a look at the help and documentation for jacobian. HTH

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to plot a 3D graph with non numerical values?
The simplest method might be to map your classes to some integer range and then use the standard plotting functions. In your cas...

presque 7 ans il y a | 0

Réponse apportée
How to display figure in full-screen mode programmatically and save as a high resolution image?
To save as high-resolution, I regularly use: print('-depsc2','-painters','J.eps') If you desperately want the image as a png-i...

presque 7 ans il y a | 1

Réponse apportée
How to store 2D variables in matrix
For the storing the point coordinates you might look at either cell-arrays: r1 = [1,2,3]; r2 = [3,2,5]; r3 = [4.5,pi,1,5]; %...

presque 7 ans il y a | 1

Réponse apportée
Problem getting number of ticks and labels to work properly
Do you get your xticks at the even years with the xticklabels for the first 6 years? You can at least check the x-tick values w...

presque 7 ans il y a | 0

Réponse apportée
De-resolution of Dicom Image
So you problem is that you cannot figure out how to save a file to a new same-name file in another directory? If so something l...

presque 7 ans il y a | 0

Réponse apportée
A switch case statement that will help me to either run codeS in Windows or linux, based on whichever OS it is
Have a look at the commands: computer, ispc, insunix, ismac. HTH

presque 7 ans il y a | 0

Réponse apportée
zoom plot into plot
Maybe this file exchange contribution does what you need: zoomplot Or any of these: on-figure-magnifier, maginset, interactiv...

presque 7 ans il y a | 0

Charger plus