Réponse apportée
How to find the point where most lines intersect in a binary image?
A good solution would be to identify each line by e.g. Hough transform, determine each intersection (e.g. <https://se.mathworks....

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
One Plot two different y-axis, how to scale second y-axis?
Probably not what you want, but perhaps one step closer: x=[0 100 300 500 800 800] y1=[0 100 180 200 255 260] y2=[155...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to replace certain cells in heatmap with "Not Detected"?
Best you can do is probably to set all zeros to NaN and then add this line set(gca,'missingdatalabel','not detected') Z...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How do I combined all peak to become one spectral line?
They key is to resample the curves along a common x-vector. You can do this by interp1. Just add these new lines of code: ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Count two columns with corresponding data
Try this: x is speed, y is direction sum(x>0 & x<3 & y>0 & y<45) the conditions inside of the braces gives a logical...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Filtering timeseries with NaN
It's easier to use logical indexing. If _good_ data lies below a certain threshold, then _bad_ data lies above that threshold. S...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to avoid marker clipping while saving two axis figure to pdf?
Not the first time I see clipping issues with plotyy. Simple solution, avoid using plotyy % Create two axes ax(1)=axes('...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
how to overlay multiple images using scatter3?
This is a continuation of <https://se.mathworks.com/matlabcentral/answers/418703-how-to-plot-by-scatter3-a-3d-matrix-with-its-el...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How can i insert a vector in a position into a matrix that already has values?
A is your matrix B is your vector out=[A(1,:);B;A(2:end,:)];

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
pltoting a variable with dates on horizontial axis
Here is something you can work from. I used a trick with the |stairs| and |area| functions to make the shaded bars. It may have ...

plus de 7 ans il y a | 2

Réponse apportée
How can i create efficiency isolines in a compressor map?
This is what I'm getting from the data you uploaded. %% Load data rpm{1}=xlsread('data_compressor_map.xlsx','A3:D10'); ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Legend for scatter plot has lines through markers
The third argument in |plot| sets the line style *and* markerstyle. If you do not specify a 3rd argument then |plot| assigns a l...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
how to plot by scatter3 a 3D matrix with its elements being logic variables?
You can use your logic data in A to set the color and your X, Y and Z data for coordinates. scatter3(X(:),Y(:),Z(:),[],A(...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to trim data in a matrix?
X(0) is not a valid index. Try this: X(:,[1:130,589:end])=[]; This removes the columns from 1 to 130 and 589 onward, so ...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
Changing the axes in a figure from geographical coordinates to distance in km
I found your figure in another question and attached it to this answer. You could try something like this: % Units of lat/l...

plus de 7 ans il y a | 1

Réponse apportée
Plot a timeseries in a group?
You can try this code. I used some messy dynamic field naming to do the plots. Will clean this up tomorrow, but too tired right ...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
How to find a point in a dataset at which graph is changing (aka whole graph derivative)
findchangepts has a number of <https://se.mathworks.com/help/signal/ref/findchangepts.html#namevaluepairs *optional inputs*> . T...

plus de 7 ans il y a | 0

Réponse apportée
How to scale axis of a contour graph?
Just use the actual x and y-data as input to contour. If you do not specify x and y-data then contour just plots the data agains...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Find intersection of two guassian curves
If you have only one intersection, then you can just find the minimum difference [~,idx] = min(abs(y1 - y2)) This will ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How can i create an image with randomly distributed filled circles (not only the contours), having different colours?
You could try using |viscircles| % image size xres = 640; yres = 480; % radii & centers n = 200; rr = ra...

plus de 7 ans il y a | 0

Réponse apportée
Is there a faster way to change zeros to ones and ones to zeros?
You can do A = ~A however it returns a logical, so if you want a uint8 you have to: A = uint8(~A)

plus de 7 ans il y a | 4

| A accepté

Réponse apportée
How to show values on heatmap belonging to a different dataset.
Here's an example using |imagesc| and |text| % Grid [X,Y]=meshgrid(1:10,1:10); % Two data sets to compare A=ra...

plus de 7 ans il y a | 3

| A accepté

Réponse apportée
XtickLabels on plots or scatters
Something like this? x = 1:5 A = [2,3,4,5,6] figure scatter(x,A) set(gca,'xtick',x,'XTickLabel',{'a','b','c',...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Here is my code. I am trying to draw 3 lines in one graph, but only two of them are shown in the graph. What is the problem with the black one?
Probably the background of ax2 is hiding ax1. Try this: set([ax1 ax2], 'color', 'none')

plus de 7 ans il y a | 0

Réponse apportée
How can I filter data outside of a polygon border?
I'm guessing the problem is that your data is structured in gridded format, as you'd get from |meshgrid|. Try: [in,on] = in...

plus de 7 ans il y a | 0

Réponse apportée
How to create a column of defined values fixing the first and the last positions
linspace(0.7,3.5,1001)'

plus de 7 ans il y a | 0

Réponse apportée
How do I create a string for values
The class of P is double. You cannot put a string in a double, because a string is not a number. Try replacing the final loop wi...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Making a graph from my Matrix
A is your matrix x=[1 4 7 10]; plot(x,A(A(:,5)==1,1:4),'r') plot(x,A(A(:,5)==0,1:4),'b')

plus de 7 ans il y a | 0

Réponse apportée
Using yyaxis how do I limit and select a range for the y and x axis?
Your syntax is a bit off *set axes limits* % two element vector with min/max xlim([5 50]); *set axes ticks* %...

plus de 7 ans il y a | 1

Réponse apportée
InterX not accurate for one intersection point
It's because you're comparing the points one loglog scale. I suspect InterX uses linear interpolation to find the point of inter...

plus de 7 ans il y a | 0

Charger plus