Réponse apportée
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(...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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! ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
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)."_...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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. ...

plus de 7 ans il y a | 0

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

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
add units to colorbar TickLabels (format)
c = colorbar; c.Ruler.TickLabelFormat='%g%%'

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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....

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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 = ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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');...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 7 ans il y a | 0

Réponse apportée
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)); %...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

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

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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'...

plus de 7 ans il y a | 3

| A accepté

Réponse apportée
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, ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

Charger plus