Community Profile

photo

jonas


407 total contributions since 2018

Please do not send private requests per e-mail, as I wish for my contributions to reach a broader audience. If you specifically want help from me, feel free to grab my attention by sending an email with a link to your question.

Contact

jonas's Badges

  • Revival Level 1
  • Thankful Level 1
  • Pro
  • Knowledgeable Level 4
  • 6 Month Streak
  • First Answer

View details...

Contributions in
View by

Answered
How to make a graph that shows evolution of a variable in time through different depths in a lake.
Just create a surface object. d = is your depth (1x38) t = is your time (1x3705) Te = is your temperature (3705...

19 hours ago | 0

Answered
How can make arrows into the line step by step?
What you see on the figure is a quiver3 plot, where the arrows describe velocity. You did not provide any velocity data, but you...

20 hours ago | 0

| accepted

Answered
how to handle variable time stamped long time series data?
# Load data # Put data in two timetables # Use synchronize # Step 1-3 did not work? Upload the data.

20 hours ago | 0

Answered
colour map scatter with multiple groups / variables
I would probably just create a new axes for each new scatter object. Each object then scales automatically and the same method w...

1 day ago | 0

Answered
Interpolate gridded matrix row-wise
Normally you could achieve this easily by interpolating over rows with a function that does not extrapolate by default. I believ...

2 days ago | 0

| accepted

Answered
Overlaying a contourf plot on a grayscale image
You can use two linked axes with different colormaps. Example: % Axes ax(1)=axes('color','none','xcolor','none','ycolor'...

3 days ago | 0

| accepted

Answered
How could I change the Linewidth of XTick or YTick without changing the Box or Edge lineWidth?
You have to dig through the undocumented properties, but its possible ax.XAxis.MajorTickChild.LineWidth = 2

4 days ago | 0

| accepted

Answered
Interpolate multiple data for a plot
Normally I'm not a big fan of fraction years, but here we go: % Common time vector tc = 1850:.1:2020; % interpola...

4 days ago | 0

| accepted

Answered
How to number rows of a table by group
Can try something like this: PATID = [1 1 3 3 3 5 9 9 12]' T = table(PATID) out = varfun(@(x)1:length(x),T,'InputVari...

4 days ago | 1

| accepted

Answered
Calculate distance between a point and a contour line
Here is my code so far. The units of the output is not entirely correct, but should be quite easy to fix. % Trajectory...

5 days ago | 0

| accepted

Answered
Grouping time stamp data into intervals
I'm a little bit confused as of what you want to do with those segments, but this code should find them for you. I'm not entirel...

5 days ago | 0

| accepted

Answered
Plotting 3 differing intervals of time in a bar style to show when an interval is occuring
I'll admit that I misunderstood the question the last time it was posted. However, the general approach still works the same. ...

5 days ago | 0

| accepted

Answered
Interpolate and synchronize two time series
# Create two timetables using table2timetable (you have to converted the time to duration or datetime format) # Use synch...

5 days ago | 1

| accepted

Answered
How can i sum over seconds ?
t = datetime(testclick{:,1}); ts = dateshift(t, 'start', 'second') N = histcounts(ts,'binmethod','second') This wil...

5 days ago | 1

Answered
manipulating plot legend, assigning colours
*Always* output the plot handle. h = plot(...) If you are plotting in a loop, then save all handles. h(i) = plot(....

5 days ago | 0

Answered
Matlab code for generating some shapes using signed distance
I had to read a bit about _"signed distance fields"_ and came across this blogpost *<https://blogs.mathworks.com/graphics/201...

7 days ago | 0

| accepted

Answered
fprintf linspace and variable IN THE RIGHT ORDER
Some problems with your loop. clc clear m = input('Slope: '); c = input('Intercepts: '); p = input('How many e...

8 days ago | 0

Answered
How can I make this type of array.
horzcat(yk,[0;yk(1:end-1)]) ans = 0 0 0.019530000000000 0 ...

8 days ago | 0

| accepted

Answered
How can I add standard error bars from standard deviation to individual points on a scatter plot ??
I do not have your dataset so cannot run your code. Here's an example of how to use the build-in function errorbar. Should be ea...

8 days ago | 0

Answered
I'm trying to organize data so it can easily be averaged by date
_"...something like H(1,2,:), it would return all the data from the second day of January."_ Not very good in my opinion. How...

8 days ago | 1

| accepted

Answered
Reading text file word by word
Try this minor change short_word = fscanf(fileID, '%s+'); ↑ Edit: After further testi...

8 days ago | 2

| accepted

Answered
How to plot latitude and longitude on the shape-file i used in MATLAB ?
Have you tried <https://se.mathworks.com/help/map/ref/geoshow.html *geoshow(lat,lon)*>

9 days ago | 0

| accepted

Answered
file handling with coordinates
I would approach this roughly as follows: * Read all coordinates and group them by state * Use a grouping function ( *findro...

9 days ago | 0

Answered
MATLAB Timeseries Resample Error: Quality vector must be initialized.
I suggest that you use a <https://se.mathworks.com/help/matlab/timetables.html *timetable*> and <https://se.mathworks.com/help/m...

9 days ago | 0

Answered
How to find the slope of phase data (between two points) which is uneven
I would suggest using either <https://se.mathworks.com/help/signal/ref/findpeaks.html *findpeaks*> to determine points a and b a...

9 days ago | 0

Answered
Plot Specific Info from a data file?
2nd and onward is written as 2:end What you wrote is interpreted as 'each row, 2nd column and last value in the 3rd dime...

10 days ago | 0

Answered
computing number of days between a matrix of dates
Put all dates in datetime format T = datetime(Tvec) then Tdiff = T - T(1) will output a duration vector

10 days ago | 0

Answered
How to set same scale for contourf subplots?
Use the same <https://se.mathworks.com/help/matlab/ref/caxis.html *caxis*> caxis([min max]) And yes, you may also want t...

10 days ago | 0

| accepted

Answered
How can i get the same text from another function
Store their handles in a variable and pass it as output from the first function and input to the second. Alternatively you could...

10 days ago | 0

| accepted

Answered
How to plot a shape away from the x and y axis?
Just adjust the axes limits h=input('What shape do you want?:','s'); a=input('The length of a side is (m):'); if st...

11 days ago | 0

| accepted

Load more