已回答
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'...

6 years 前 | 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

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 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. ...

6 years 前 | 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...

6 years 前 | 2

| 已接受

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

6 years 前 | 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(....

6 years 前 | 1

| 已接受

已回答
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...

6 years 前 | 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...

6 years 前 | 0

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

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 1

| 已接受

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

6 years 前 | 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)*>

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 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

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 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...

6 years 前 | 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 ...

6 years 前 | 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...

6 years 前 | 1

| 已接受

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

6 years 前 | 3

已回答
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...

6 years 前 | 0

| 已接受

加载更多