답변 있음
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...

7년 초과 전 | 1

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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 ____ ____ ...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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},~] = ...

7년 초과 전 | 0

| 수락됨

답변 있음
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 ...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
take three matrices into a single matrix
A=[a1;a2;a3] a1 through a3 are single line vectors

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 1

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 1

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

거의 8년 전 | 0

답변 있음
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...

거의 8년 전 | 0

| 수락됨

답변 있음
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...

거의 8년 전 | 0

| 수락됨

답변 있음
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...

거의 8년 전 | 0

답변 있음
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...

거의 8년 전 | 0

| 수락됨

답변 있음
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...

거의 8년 전 | 1

| 수락됨

답변 있음
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...

거의 8년 전 | 2

| 수락됨

답변 있음
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...

거의 8년 전 | 0

| 수락됨

질문


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

거의 8년 전 | 답변 수: 0 | 0

0

답변

답변 있음
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...

거의 8년 전 | 0

답변 있음
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),...

거의 8년 전 | 0

| 수락됨

답변 있음
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...

거의 8년 전 | 0

답변 있음
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...

거의 8년 전 | 1

| 수락됨

답변 있음
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...

거의 8년 전 | 0

답변 있음
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...

거의 8년 전 | 0

| 수락됨

답변 있음
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';

거의 8년 전 | 1

| 수락됨

답변 있음
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|

거의 8년 전 | 0

더 보기