Beantwortet
Plotting multiple columns with their labels (first row) against the second column (time)
Here's something to start from % Load in=load('DATASET194.mat') c=in.c; % Remove first and last col c(...

mehr als 7 Jahre vor | 2

| akzeptiert

Beantwortet
Extending data on 10-min intervals to 1-sec interval
Since you are already using timetables this is trivial dt = seconds(1) TT = synchronize(TT1,TT2,'regular','linear','Ti...

mehr als 7 Jahre vor | 0

Beantwortet
Eliminating the Border Around a Generated Image
There is a function that will do this for you in one step, but I forgot what it's called. Here's a primitive solution for you! ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Merging tables of dissimilar rows in MATLAB.
You can do the following steps: * Create proper <https://se.mathworks.com/help/matlab/ref/timetable.html timetables> for all ...

mehr als 7 Jahre vor | 2

| akzeptiert

Beantwortet
Trying to produce a 4x10 Table with the results at each iteration
Your code returns an error when you try to build the table. _"Index in position 2 exceeds array bounds (must not exceed 1)."_...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Display lat lon on a variable
This seems to be what you want to have. Just replace |lat|, |lon| and the input data with your own. t=uitable('data',randi...

mehr als 7 Jahre vor | 0

Beantwortet
Convert cells arrays into a matrix
|csvwrite| does not accept cell arrays and you cannot simply use |cell2mat| because your vectors have different number of rows. ...

mehr als 7 Jahre vor | 0

Beantwortet
Break in the title
Use _sprintf_ to reduce the number of _num2str_ and make the coding easier. For example: str= {' Parameters:',['S_0=' num2s...

mehr als 7 Jahre vor | 0

Beantwortet
Can you set the y-axis scale, but allow for a variable range?
Just use something like this x=1:10; y=rand(1,numel(x))+5 the_length=1; %length on x axis to view plot(x,y) set...

mehr als 7 Jahre vor | 0

Beantwortet
How can I create multiple variables for further processing in a for-loop from imported tables?
You could save the data as a cell array instead, by changing the braces T{k} = readtable(matFileName); I would r...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Wrong date while importing .csv
The date is not automatically assigned because it's not in the data but in the name of the file. You could do something like thi...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
In R2018a, How can I show the legend for only the visible lines?
Here's a way to automatically group only the visible lines and put them in the legend with their corresponding label. figu...

mehr als 7 Jahre vor | 0

Beantwortet
add units to colorbar TickLabels (format)
c = colorbar; c.Ruler.TickLabelFormat='%g%%'

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to use textscan to read my 2nd column and ignore the string or non numerical values?
Here's another approach with regexprep and textscan %% Read and remove annoying intermediate headers str=fileread('File....

mehr als 7 Jahre vor | 0

Beantwortet
How to make a heatmap with density of points
See this thread on density plots using hist3 and contourf <https://se.mathworks.com/matlabcentral/answers/409660-can-i-use-co...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
How do I make an average of points ?
Based on your simple example: A=[1 2 3 4 5 6 7 8 9 10; 5 2 4 6 7 4 5 6 7 8; 1 2 3 4 5 6 7 8 9 10] out = ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Replace a number in a matrix depending on neighbor numbers
It is unclear if elements connected diagonally count as neighbours. If not, then you could try something like this. %% Work...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Flipping the colours in the legend
I don't know how to re-arrange the legend _after_ you have already created it. However, you can easily avoid this problem by thr...

mehr als 7 Jahre vor | 0

Beantwortet
How to create a new data set, from an existing data set, with a different time increment than the original
# Convert |x| to <https://se.mathworks.com/help/matlab/ref/duration.html duration array> # Build a <https://se.mathworks.com/he...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
How to ignore headers and select specific rows of Data to be improrted from text file.
You can try this (probably overly complicated) solution using regular expressions %% Read file str=fileread('File.txt');...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
How to detect the peaks of these function?
Try this: data=readtable('MyFile.txt','headerlines',2); Y=data.Var1; X=1:length(Y) [tf,s1,s2] = ischange(Y,'linear...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
rotate figure by transposing matrix in contourf problem
Transposing every matrix does not change anything. If you throw two matrices X & Y as input, then the coordinates for each Z-val...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How can I fill multiple polygons from the same vector?
Use patch. Each patch is defined by the coordinates of the columns of the input matrix. As such, all patches must have the same ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How can I save an axes which has multiple coordinate systems?
|Copyobj| doesn't seem to work with yyaxis because you end up with a single axes object having multiple coordinate systems. You ...

mehr als 7 Jahre vor | 0

Beantwortet
Hourly variation of wind for each month, using Quiver
This is my attempt with normalized/scaled arrows. See attachment. load Viento_DMC T=datetime(datevec(TIEMPO)); %...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
Axis Clipping not working in pdf print
I think I have finally figured it out. The issue is related to the |yyaxis right| command, which creates a 2nd yaxis with defaul...

mehr als 7 Jahre vor | 0

Beantwortet
Skip big header from a txt file
fid = fopen('datam.txt'); C = textscan(fid,'%d%d%d%*[^\n]',... 'Delimiter',' ',... 'TreatAsEmpty','No',... ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How do I convert date into day of the year?
You don't really need the hour of day. data=xlsread('Lat30.xlsx'); date=datetime(data(:,1:3)); d=day(date,'dayofyear'...

mehr als 7 Jahre vor | 3

| akzeptiert

Beantwortet
How to set colormap for a 3D surface that is projected onto the XY Plane?
In the answer to the other question: _"You can use a different colormap and a different method for calculating the Z-values, ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Aligning subplots (colorbar and axis equal issue)
This was more difficult than I'd imagined, as *axis equal* changes the 'tightinset' and 'aspectratio' of the plot. This fileexch...

mehr als 7 Jahre vor | 1

Mehr laden