Risposto
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'...

oltre 5 anni fa | 0

| accettato

Risposto
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

oltre 5 anni fa | 2

| accettato

Risposto
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...

oltre 5 anni fa | 0

| accettato

Risposto
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...

oltre 5 anni fa | 1

| accettato

Risposto
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...

oltre 5 anni fa | 0

| accettato

Risposto
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...

oltre 5 anni fa | 0

| accettato

Risposto
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. ...

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 2

| accettato

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

oltre 5 anni fa | 1

Risposto
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(....

oltre 5 anni fa | 1

| accettato

Risposto
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...

oltre 5 anni fa | 0

| accettato

Risposto
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...

oltre 5 anni fa | 0

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

oltre 5 anni fa | 0

| accettato

Risposto
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...

oltre 5 anni fa | 1

Risposto
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...

oltre 5 anni fa | 1

| accettato

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

oltre 5 anni fa | 2

| accettato

Risposto
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)*>

oltre 5 anni fa | 0

| accettato

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

oltre 5 anni fa | 0

Risposto
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...

oltre 5 anni fa | 0

Risposto
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...

oltre 5 anni fa | 0

Risposto
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...

oltre 5 anni fa | 0

Risposto
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

oltre 5 anni fa | 0

Risposto
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...

oltre 5 anni fa | 3

| accettato

Risposto
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...

oltre 5 anni fa | 0

| accettato

Risposto
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...

oltre 5 anni fa | 0

| accettato

Risposto
How to group the green contour and the yellow contour?
Sure, the first output of the imcontour, just like any other contour plot, is a <https://se.mathworks.com/help/matlab/ref/matlab...

oltre 5 anni fa | 0

| accettato

Risposto
How do I extract data from polyshape figures
If you are looking to extract the polyshape, then it's stored in the polygon object's *shape* property. So for example ...

oltre 5 anni fa | 0

Risposto
How to draw a graph with a colormap from a txt file?
You can do that with e.g. <https://se.mathworks.com/help/matlab/ref/surf.html *surf*> or <https://se.mathworks.com/help/matlab/r...

oltre 5 anni fa | 1

| accettato

Risposto
How to convert cell to double ??
have you tried <https://se.mathworks.com/help/matlab/ref/cell2mat.html *cell2mat*>? or simply, A = [C{:}]

oltre 5 anni fa | 3

Risposto
Make larger plot when mouse hover over subplot
I wrote a little demo for how you can program this using callbacks. The reason I wrote it is because I am trying to learn callba...

oltre 5 anni fa | 0

| accettato

Carica altro