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

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

Respondida
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},~] = ...

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 0

| aceptada

Respondida
take three matrices into a single matrix
A=[a1;a2;a3] a1 through a3 are single line vectors

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 2

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

Pregunta


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

alrededor de 8 años hace | 0 respuestas | 0

0

respuestas

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

alrededor de 8 años hace | 0

Respondida
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),...

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 0

| aceptada

Respondida
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';

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 0

Cargar más