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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 2

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

Frage


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

mehr als 7 Jahre vor | 0 Antworten | 0

0

Antworten

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

Mehr laden