Community Profile

photo

Bjorn Gustavsson


Last seen: Today

UIT, the Arctic University of Norway

821 total contributions since 2001

Contact

Bjorn Gustavsson's Badges

  • First Submission
  • Explorer
  • 5-Star Galaxy Level 5
  • 12 Month Streak
  • Knowledgeable Level 4
  • Personal Best Downloads Level 2
  • Pro
  • Editor's Pick
  • First Review
  • Revival Level 1
  • Thankful Level 1
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
Getting linear results from ODE45 instead of exponential
When you look at the result you have to start looking at how big the different components of the forces are along the trajectory...

2 hours ago | 0

Submitted


ratio_of_uncorrelatednormalpdf
RATIO_OF_UNCORRELATEDNORMALPDF probability density function of ratio between two uncorrelated normal distributed variables.

15 hours ago | 1 download |

Thumbnail

Answered
How to find integral over 2D image
If you want to have dW at the same resolution as your original image, just add the four terms together. If you want some local s...

1 day ago | 0

Answered
Intersection of a 2D polygon in 3D and a straight line
OK, you'll get a bit of pseudo-code/algebra, that solves most of the problem. Lets write the equation for the plane as: that ...

2 days ago | 0

Answered
Gaussian envelope on the diagonal of a matrix
Something like this: [x,y] = meshgrid(0:32); M = exp(-(x-y).^2/4^2); imagesc(x(1,:),y(:,1),M) Adjust width as you see fit. ...

4 days ago | 1

Answered
How do I add scale markers to the legend, to indicate values for the sizes of points in a scatter plot?
I'd do something like: sz = 12:2:24; % your suitable selection for your dimentionC-mapping-to-size y4size = linspace(45,110,...

5 days ago | 0

| accepted

Answered
Solved it, thanks anyway
Have a look at the help and documentation of the convhull function. HTH

5 days ago | 0

Answered
Differentiate with respect to a symbolic function
When I've used the Euler-Lagrange method I've used this tool: Euler-Lagrange tool (that handles this). If you need to solve a pr...

5 days ago | 1

Answered
Change folder that Matlab saves session information
Which version are you using? How much space does .matlab take? On my machine I have subdirectories for 2013a, 2015a and 2020a,...

6 days ago | 0

| accepted

Answered
Cannot calculate gradient of contour plot
If you modify your call to gradient to: [FU, FV] = gradient(F, diff(y(1:2)), diff(x(1:2))); You get a more reasonable set of q...

6 days ago | 0

| accepted

Answered
I would like to take double integral over standard normal distribution but it does not work.
Your problem might be that the symbolic toolbox have no way of knowing that your correlation is between -1 and 1. If you try the...

6 days ago | 0

| accepted

Answered
I tried to run my script written in 2017a in R2020b: Error using load Unable to read file 'coast.mat'. No such file or directory. Any idea on how to solve it?
Well you will somehow find the missing file. The reason you now get the error is because matlab-2020b for some reason cannot fin...

7 days ago | 0

Answered
Why am I warned about defining variables in a nested function, when I don't?
Because nested functions share the name-space with its parrent function. That is all variables in the parrent function are avail...

7 days ago | 4

Answered
How to write a video from png files and/or matlab figures
Try modifying your call to writeVideo to this: currFrame = getframe(gcf); writeVideo(vidObj,currFrame); HTH...

7 days ago | 0

| accepted

Answered
how do i make this contour plot more presentable
The crossing contours confuse/worry me, are you adding additional contours from another data-set ontop of your contourf-plot? ...

7 days ago | 0

| accepted

Answered
Contourf fill smaller instead of larger
You "simply" have to create a colormap that is white (or suitable levels of pale, or black in case of that making more esthetic ...

7 days ago | 0

Answered
Is it possible to determine the angle of rotation for this graph?
If you have your signals in y1 and y2 you can try to use circshift with an incremental shift until you see a reasonable fit. You...

8 days ago | 0

| accepted

Answered
How to create 2D Polar (r, theta) mesh?
What's not good enough with something like this: n_phi = 15 phi = linspace(0,pi/2,n_phi+1); % should give you 15+1 edges and 1...

9 days ago | 1

Submitted


Skymap
SKYMAP An easy to use medium accuracy astronomical starchart, with high-resolution stellar spectra, and a intuitive GUI

9 days ago | 5 downloads |

Thumbnail

Answered
plotting of |y| graph
plot(t,abs(y)) HTH

10 days ago | 0

| accepted

Answered
Integration with both limits variable
Matlab has both a numerical and a symbolic version of the error-function. That will be the answer to your problem. The numeric v...

11 days ago | 0

Answered
Reduce computational time for ODE solver
Have you tried the other ODE-integrating functions? From your problem description it sounds like your ODEs are stiff - for that ...

11 days ago | 0

| accepted

Answered
2D colormaps. MxN matrix of RGB values for 4 colors gradient
If you do something like this: [hsvImg] = rgb2hsv(Imrgb); x_lims = [1 184; 199 383; 397 581; ...

13 days ago | 1

Answered
Integrating min and max function
This might not be the most elegant solution to this, but it's a first stab. Take a quick-look at what the function looks like: ...

13 days ago | 1

Answered
Maximization of a Function
When I create a sequence of functions like that I always have to have the input-variables explicitly visible on the right-hand s...

14 days ago | 0

Answered
Improving the computation speed of loops
When you want to search for ways to optimize your code always run it with the profiler to identify where the time is spent. pro...

15 days ago | 0

| accepted

Answered
Image fusion of 3 images
Perhaps: Im_fused = Im1/3 + Im2/3 + Im3/3; or more generally: w = [1 2 3]; w = w/sum(w); Im_wfused = w(1)*Im1 + w(2)*Im2 + ...

15 days ago | 0

Answered
Legend Color doesn't Match the Curves Color
That's peculiar. What happens if you keep the plot-handle from your calls to semilogy and send that to legend? ph = semilogy(z,...

15 days ago | 0

Answered
Fourier transform of a picture?
Note that the actual Fourier transform is the second row of your equation, while the first factor you can see as a matrix with n...

19 days ago | 1

Answered
Harmonic Oscilation. When I plot f towards time amplitude is increasing I don't know why. It should be constant. what's wrong?
Well if you have an equation of motion you should write it as an ordinary differential equation and solve it with a more ambitio...

20 days ago | 0

| accepted

Load more