# Bjorn Gustavsson

### UIT, the Arctic University of Norway

**Statistics**

RANK**62**

of 249,651

REPUTATION**2,200**

CONTRIBUTIONS

**4** Questions

**1,283** Answers

ANSWER ACCEPTANCE **
25.0%
**

VOTES RECEIVED**347**

RANK**7,962** of 17,360

REPUTATION**88**

AVERAGE RATING**3.40**

CONTRIBUTIONS**17** Files

DOWNLOADS **44**

ALL TIME DOWNLOADS**27860**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Creating a gif file out of an animation

I had a great experience using gif from the file exchange to convert a series of plots into a gif-animation. Simple to use does ...

2 days ago | 0

How can i form a filename from MATLAB identifier and correcting sntax error in "3dinvert.m"

There are restrictions of the filenames for matlab-functions, and as far as I recall it is supposed to not start with a number (...

3 days ago | 0

does convex hull intersect?

You should have two file-exchange packages that solves your problem: fast-and-robust-curve-intersections curve-intersections ...

4 days ago | 0

How to make a line plot with a colorbar as the third variable?

When I want to plot colour-coded curves I use one of these functions from the file exchange: cline, cline-m or plot-3d-color-li...

4 days ago | 0

Polar Plotting of Data

The pcolor in polar coordinates is the polar version of pcolor. For those functions you will need some kind of 2-D surface-like ...

4 days ago | 0

how to apply stft to audio signal?

You might do this, but the call to seconds looks spooky. From audioread you get the sampling-frequency fs, that is the sampling-...

4 days ago | 0

Assign a value to each page of a 3D Matrix

If we stick to the first rule of programming (KISS) this should get the job done: A = zeros([3,4,5]); x = [10 20 30 2^.5 exp(1...

6 days ago | 0

| accepted

Find and visualize the divergence of a vector function F = yzi xzj xyk. Please help me guys, please

Simply use the divergence function. Read the help and documentation to that one. If you have analytical expressions and access t...

6 days ago | 0

Solving eigenvalue problem with solve_bvp

In the mat4ode function the variable Ra is undefined. How would matlab know what value to give it? What dimension should it have...

6 days ago | 0

how to denoising rgb image?

Well nothing but a simple goof. You simply swapped the green and blue channels in this line: restored_image = cat(3, out_redCha...

6 days ago | 0

| accepted

contour3-With 3 dimensions input arguments

Maybe you get what you need with the slice function, or perhaps isosurface. From my naive understanding we can draw iso-contours...

6 days ago | 0

How to generate a rhythm that is based on an algorithm in matlab?

1, You search for some description of the algorithm that allows you to implement it. For example 5 minutes on googles first page...

7 days ago | 0

How to deblur an image in frequency domain?

Most likely you have a problem with division-by-zero in the: Inv = Conv./avgFilter_fft; step. If you try to set those componen...

10 days ago | 1

| accepted

Find Angle using point coordinates?

You could use the general formulas for angle between vectors found here: angle-between-two-vectors-in-3d, which is a good answer...

10 days ago | 1

| accepted

How to randomly propagate 100 random targets with random headings (uniformly sampled over [0, 2π])

Yes. The image is constructed with pixel-resolution, that is kind of the definition of a pixel-based image sensor. You model the...

10 days ago | 0

How can I extend polyfit line on loglog scale ?

When you calculate yhat you only do that for the first and last element of your x-values that you use for the fit. You should tr...

10 days ago | 0

| accepted

Matlab 2020b "Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters."

It might well be that the "ˆ" symbol have been encoded to some othe character than "^" (I'm completely un-interested in characte...

1 month ago | 1

Is there a way to compress non-integer data without loss using the CFITSIO library?

If you have data in double (32 or 64 bit-format), and want to keep it that way, dont' cook up your own casting-trickery - set th...

1 month ago | 0

the diﬀerential equations by ode45

Start with the matlab on-ramp material. To find that search for "onramp" on the web-site. After doing that you should be able to...

1 month ago | 0

| accepted

Spectrogram: HOW TO CONTROL ZERO-PADDING for individual fft's of an ULTRA LONG sequence

Yes, in principle, zero-padding is used by spectrogram if nFFT is larger than the window-length. HTH

1 month ago | 0

Calculus limits with MATLAB

Well get to it. If you are very new to matlab then have a look at On-ramp material - which should have you up and running faster...

1 month ago | 0

| accepted

Remove edges from concave triangulation

You problem is dificult in principle. How are the unwanted triangles supposed to be determined? In a general enough case that yo...

1 month ago | 0

Plot spectra and spectrogram of acceleration data

Provided that your data actually spans 5 minutes your sampling-frequency is not 48 kHz, but rather 800 Hz. That changes the outp...

1 month ago | 0

| accepted

Which optimizer to use for SIR Epidemic Model?

One recommendation that you're not likely to like: The constant transition-probability of recovering/dieing has to be unbiologic...

1 month ago | 1

to use tiledlayout to arrange pre-existing axes ?

When I need control of the figure layout and design I always save away the handles to "everything" - which makes it at least som...

1 month ago | 0

| accepted

How do i transform this equation system in to three dimensions?

Since this looks like the equations of motion for a solid body falling in a constant gravitational field with some velocity-depe...

1 month ago | 0

Change the markers color in the figure after plotting

You should be able to change the color of the points by using the hp output: set(hp(1),'color',[0.95,.3,0.1]) set(hp(2),'color...

1 month ago | 1

learning to create functions in matlab(R2019a) but every time i try to do so , The value assigned might be un used (used a)create the file in code file, Am a beginner

Ok, here's what you're missing in this example: function a = myRand a=1+rand(3,4)*9; end Now your function has an output-va...

1 month ago | 0

Convex Hull without the in-built function.

Take it step by step. 1, put points on paper. 2, work out how to step from the point with the smallest y-value to the next poi...

1 month ago | 1

Newton Iteration using symbolic function

Since you use symbolic variables and do the calculations symbolically you will get a symbolic answer. Here you should convert y...

1 month ago | 0