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

4年弱 前 | 0

| 採用済み

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年弱 前 | 2

| 採用済み

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年弱 前 | 0

| 採用済み

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年弱 前 | 1

| 採用済み

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

4年弱 前 | 0

| 採用済み

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

4年弱 前 | 0

| 採用済み

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

4年弱 前 | 0

| 採用済み

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

4年弱 前 | 2

| 採用済み

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

4年弱 前 | 1

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

4年弱 前 | 1

| 採用済み

Matlab code for generating some shapes using signed distance

4年弱 前 | 0

| 採用済み

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

4年弱 前 | 0

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

4年弱 前 | 0

| 採用済み

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

4年弱 前 | 1

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

4年弱 前 | 1

| 採用済み

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

4年弱 前 | 2

| 採用済み

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

4年弱 前 | 0

| 採用済み

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

4年弱 前 | 0

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

4年弱 前 | 0

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

4年弱 前 | 0

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

4年弱 前 | 0

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

4年弱 前 | 0

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

4年弱 前 | 3

| 採用済み

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

4年弱 前 | 0

| 採用済み

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

4年弱 前 | 0

| 採用済み

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

4年弱 前 | 0

| 採用済み

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

4年弱 前 | 0

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

4年弱 前 | 1

| 採用済み

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

4年弱 前 | 0

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

4年弱 前 | 0

| 採用済み