Réponse apportée
Extract specific hour data from timetable
I assume that's 8AM to 4PM inclusive. Here's one way: T = readtimetable('T.xlsx'); disp(T) % original tod = timeofday(T.tim...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
For a known number of plots on the same axis, how do I set the colourscale?
data = (1:100).'+(1:20); n_lines = size(data,2); colors = jet(n_lines); figure colororder(colors); plot(data)

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to use the 'patch' function to display missing intervals in only one of the graphs created with the given code?
EDIT to include OP's data, which I missed initially. EDIT to include a patch face for missing data at the start or end of a fil...

environ 2 ans il y a | 2

| A accepté

Réponse apportée
Multiplying two variables in a table together
T.Power = T.Voltage.*T.Current; where T is your table.

environ 2 ans il y a | 1

| A accepté

Réponse apportée
How to make a loop end when you reach the end of some data
counter = 0; for ii = 1:numel(data) if condition counter = counter+1; end end

environ 2 ans il y a | 0

Réponse apportée
How to determine if an axes already has a colorbar?
There is a hidden axes property called 'Colorbar', which you can use. % two axes, one with colorbar, one without ax = subplot(...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
pérdida de colormap despues de activar y desactivar eje Y secundario en appdesigner
From the "Tips" section of the yyaxis documentation: "To clear the active side, use cla. To clear both sides of the axes and re...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
How to Add Border to Single Color Region in pcolor Plot
load TestData [m,n] = size(medianVarianceAll2); [X,Y] = meshgrid(1:m,1:n); figure h = pcolor(X',Y',medianVarianceAll2); c...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
Why between(datetime1, datetime2) is different from (-1)*between(datetime2, datetime1)?
From the between documentation: "In general, t2 is not equal to t1 + dt, unless you include 'time' in components."

environ 2 ans il y a | 1

Réponse apportée
Matlab error how to fix?
"creating a m by 2 matrix where the first column is a datetime and second column is numeric" You cannot mix data types in a mat...

environ 2 ans il y a | 0

Réponse apportée
Non-numerical data is still being loaded onto table. Need advice.
Note that the table returned by readtable is stored in app.dataTable before it's checked for non-numeric variables, so other par...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Solving an array without for loops
permute might be useful. Example: Array_1 = rand(3,10); % size of Array_1: [3, 10] Array_2 = rand(3,15); % size of Array_2: [3...

environ 2 ans il y a | 0

Réponse apportée
Unable to display uicontrol within a given panel?
"checkbox1 = uicontrol(ax2, ...)" won't work because an axes cannot be the parent of a uicontrol, as the error message said. "...

environ 2 ans il y a | 0

Réponse apportée
Fill area between two lines
It looks like xxO is a row vector and envelopeminO and envelopesupO are column vectors (any other combination would work properl...

environ 2 ans il y a | 2

Réponse apportée
Circular shifting or rotating structure of array elements
A 1x3 array of structures: S = struct('x',{4 20 5},'y',{8 24 15}) S.x S.y 1. Shift the third element to first one using circ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Circular shifting or rotating structure of array elements
A structure of arrays: S = struct('x',[4;20;5],'y',[8;24;15]) S.x,S.y 1. Shift the third row to first one using circshift: S...

environ 2 ans il y a | 0

Réponse apportée
How to use for loop and get the result for each index varian?
"after running, it only gives the last model's result" Of course, because Optimizevalue is overwritten on each loop iteration. ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Multiple Uses of UIMENU
"there seems to be a lot of duplicity. Is there a more elegant way to ahcieve this" Multiple components (e.g., uitables) can ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to adjust color of each bar in a grouped bar plot?
% data = [F_CRPS_ip A_CRPS_ip; F_CRPS_is A_CRPS_is; F_CRPS_rho A_CRPS_rho]; data = rand(3,2); y = data; x = ["I_P" "I_S" "...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Program not generating 0 as expected to turn variable cell to double
newZ1 = Z2*ceil(Z1/Z2); That makes each element of newZ1 the lowest multiple of Z2 greater than or equal to the corresponding e...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
It keeps giving me an error on my xlim and the graph that it gives me isn't complete
xlim should be specified as a 1x2 numeric vector of increasing values, e.g., xlim([0.3 1]); not as a character vector (with s...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
How can I modify the following code to send data row by row instead of column by column using UDP?
"I have data with five columns" I assume that's the variable data in your code. You can write data by row the exact way you ar...

environ 2 ans il y a | 0

Réponse apportée
How to send Table using UDP in MATLAB
According to <https://www.mathworks.com/help/instrument/udpport.write.html the documentation>, the "data" input is: "Vector...

environ 2 ans il y a | 0

Réponse apportée
Importing data to 3D array in matlab
Since each file has a different number of x,y, it'll be more convenient to use a cell array: Data = cell(1,nfiles); for ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to save a text file with number and text information?
Put the filenames in cell arrays. Example: lat1=1.2; lat2=3.2; long1=-44; long2=-34; grd='map.grd'; fault='fault.txt'; % fi...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
quiver plot on an image
"Is there any way to superimpose quiver plot on imshow function?" Yes. % read an image: img = imread('peppers.png'); % imsho...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to display rectangle ROI that was loaded from a file?
You can set the saved rectangles' parent to be a different/new axes. Example: % plot some rectangles: xlim([0 1]) ylim([0 1]...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to get a bar plot with unequal bin intervals?
bin_edges = [0 5 20 100]; % include the last edge (100) bar_heights = [20 10 30]; bar(bin_edges,[bar_heights(:); 0],'histc') %...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to change colors in my legend that is classified into three intervals?
Try storing the line handles returned from the m_plot calls, and then use those line handles in the legend call. That fixed the ...

environ 2 ans il y a | 0

Réponse apportée
add element in table
% load stuff from the mat files: d1 = load('matlab_d1.mat','d1').d1; ff = load('matlab_ff.mat','ff').ff; d1 ff Name in ta...

environ 2 ans il y a | 0

| A accepté

Charger plus