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

más de 7 años hace | 2

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 2

| aceptada

Respondida
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)."_...

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 0

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

más de 7 años hace | 0

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

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

Respondida
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)); %...

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 3

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 1

Cargar más