Réponse apportée
Synchronise data starting from a fixed threshold
With the data given in the comment to this answer, try this script: A=readtable('data.csv'); A=table2array(A) A...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
how to create a mean velocity matrix from multiple .dat files and plot the mean profile?
files=dir('*.dat') %If files are in current dir, otherwise enter entire path %%Preallocate some cells x=cell(1,numel...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to take out blank rows from a result table?
Let's say you have a table T=table([1;0;2;3],[3;0;1;5]) T = 4×2 table Var1 Var2 ____ ____ ...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
I know this is probably a novice question, but I am quite a Matlab novice. The while loop in my script begins to run ridiculously slow as the table "nonapattern" increases in size. Is it possible to increase the speed somehow? Thank you.
Looks like the size of the matrix is increasing by each entry. Read about <https://se.mathworks.com/help/matlab/matlab_prog/prea...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Comparing single element of one array with values of another array
*Some data* A=[1:10]'; B=randi(10,2,10)'; *Loop* row=cell(1,10); for k = 1:size(B,1); [row{k},~] = ...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Correlate two data sets
Obviously there is a linear increase over time in the longer vector. You can simply interpolate the values in the longer vector ...

environ 8 ans il y a | 0

Réponse apportée
Replace the values of a matrix by another values.
I have a feeling there is an obvious simple solution to this problem. However, you can use this for now :) A = [750 360 5...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
take three matrices into a single matrix
A=[a1;a2;a3] a1 through a3 are single line vectors

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How can I create a segmented contour plot?
Looks like you actually have a 2D data set but want to plot in 3D, which means you have to add an arbitrary 'depth'. This will g...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
How can i extract Index values of different cell arrays
Something like this should work. s = load('mydata21.mat') s=s.mydata21; c=s(:,2) %arrays with indices d=s(:,1) %ar...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to make plot with date tick labels
Very easy if you use the datetime format. data=load('data.mat'); t=datetime(1901,1:1260,1) plot(t,data.deseasoned_d...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
PLease help me to understand tight subplot fuction
First, type help tight_subplot Then, when you understand the syntax: create the axes using the function and change subp...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Plotting hitmap with different box size
Here's an alternative using scatter3. %%Some data [X,Y]=meshgrid(1:10,1:10); Z=rand(10,10).*2-1; figure;hold...

environ 8 ans il y a | 0

Réponse apportée
Extract month values (rows) out of year matrix
https://se.mathworks.com/matlabcentral/answers/317655-calculate-avergae-values-per-hour-day-month-and-year I suggest using Se...

environ 8 ans il y a | 0

Réponse apportée
Finding unknown X from known Y on a fitted exponential curve. The unknown X can possibly be OUTSIDE my range of actual data.
Use this function ( <https://se.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections link> ) to find the intersect...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Plot concentration range respectively density from 2D array
See this thread on density plots using |hist3| and |contourf| https://se.mathworks.com/matlabcentral/answers/409660-can-i-use...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to vary the interval of this matrix?
|i| is your variable, then formatSpec = '(%d:%d,%d:%d)'; str = sprintf(formatSpec,i,i+2,i,i+2) prueba=['MK_G', num2st...

environ 8 ans il y a | 0

Réponse apportée
Keep tight borders in image and still keep the title when saving
Use latest version of <https://se.mathworks.com/matlabcentral/fileexchange/23629-export_fig export_fig> . Attached are two image...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to display the midnight time in the x-axis ?
I assume you have some start date, which is here set to 2000-1-1. time=dlmread('Time_S.csv') t1 = datetime(2000,1,1)+hou...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
3 y-axis on subplot
The easiest solution for you will probably be to use the function from FileExchange and fix the scaling. Nevertheless, here is a...

environ 8 ans il y a | 2

| A accepté

Réponse apportée
How do I read a text file and convert the dates and time?
Your format string is wrong, try datenum(tt,'yyyy-mm-dd HH:MM'); better yet, use <https://se.mathworks.com/help/matlab/r...

environ 8 ans il y a | 0

| A accepté

Question


Figure properties update when exporting
*Background* I was trying to solve this question ( <https://se.mathworks.com/matlabcentral/answers/411957-3-y-axis-on-subplot...

environ 8 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
Plot Using Variable Name From For Loop
Here is one way to store the data in a single struct using dynamic field names. The data is stored in a single folder, without a...

environ 8 ans il y a | 0

Réponse apportée
How do I use findpeaks to obtain the peaks of a vector, whilst maintaining their position on the axis (instead of compressing all the peak values into a smaller vector)?
Say you have x1, x2 and y1, y2 [~, locs1] = findpeaks(y1) [~, locs2] = findpeaks(y2) Compare by plot(x1(locs1),...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to export data from a for loop without overwriting the data?
You need to save the next entry as a new index: out(ind)=1; If you have steadily increasing |i|, then you can just write...

environ 8 ans il y a | 0

Réponse apportée
How to mark periods in my matrices?
If you have the image processing toolbox, you can use the function bwconncomp to find connected 1's. Using the example in the co...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
How to group and code 2 different parts of a graph.
I happen to have your data from a previous question, so here is my suggestion: I know that you already have the start value o...

environ 8 ans il y a | 0

Réponse apportée
Is it possible to draw something outside the axis area?
Use <https://se.mathworks.com/help/matlab/ref/annotation.html annotations> . They are not connected to the axes but to the figur...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to make axis line invisible but keep xlabel and ylabel?
h=get(gca); set(h,'xcolor','none') h.XAxis.Label.Color=[0 0 0]; h.XAxis.Label.Visible='on';

environ 8 ans il y a | 1

| A accepté

Réponse apportée
How do I export a .png file including the legend by using a command?
use <https://se.mathworks.com/help/matlab/ref/print.html print> or the figure menu -> |file| -> |save as|

environ 8 ans il y a | 0

Charger plus