Réponse apportée
Why does Tiledlayout return error when using a figure with datetime as x-axis?
datetime x-axis is supported in tiledlayout. Here's an example: x = datetime(2024,9,3):hours(1):datetime(2024,9,5); y = rand(s...

plus d'un an il y a | 1

| A accepté

Réponse apportée
How to use different colormaps for different function in mesh plot.
Here is one way: % data x = linspace(-3,3,100); y = linspace(0,3,100); [X,Y] = meshgrid(x,y); Rho2 = X.*X + Y.*Y; Z = exp(-...

plus d'un an il y a | 1

| A accepté

Réponse apportée
Plot multiple graphs on the figure using plot(y,linespec)
Use hold on y_vec_1 = rand(1,10); y_vec_2 = rand(1,15); y_vec_3 = rand(1,20); figure(); plot(y_vec_1,'*-r');%gz; hold on...

plus d'un an il y a | 0

| A accepté

Réponse apportée
2×0 empty double matrix
"why is SAB21 returning " 2×0 empty double matrix"?" Because the expression 2:1 evaluates to an empty vector. SAB21 = SB (3:4,...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Can I used Unique to find unique x,y,z coordinates in table data?
load('matlab.mat') T = summaryTable1 [g_idx,result] = findgroups(T(:,[1 2 3])); vars_1 = {'meanZm','meanGAIpred'}; vars_0 = ...

plus d'un an il y a | 0

Réponse apportée
Import mutilple excel files and save then individually as matlab tables, and finally synchronize the timetables
% specify source and destination directories source_dir = 'C:\Wind_Data_Rows_Deleted_2023\test'; dest_dir = 'C:\Wind_Forecast_...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Set current axes by using axes() is not wokring
To plot like that in a uifigure, make the uifigure's HandleVisibility 'on' (it's 'off' by default), e.g.: app.UIFigure.HandleVi...

plus d'un an il y a | 1

| A accepté

Réponse apportée
Update UIAxes in App1 after computation in App2
% Button pushed function: GotoApp2Button function GotoApp2ButtonPushed(app, event) app.app1handle = findall(0, 'Name', 'My...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Storage columns of data from excel sheet on matlab table cell
"I want to create a matlab table" but you show a cell array. These methods create a cell array as you describe: Method 1: T = ...

plus d'un an il y a | 1

| A accepté

Réponse apportée
Unable to use title() for image.
You have a variable called title preventing you from using the title function. Clear it: clear title and then run you...

plus d'un an il y a | 1

| A accepté

Réponse apportée
How to Remove Specific Rows in a Multi-Column Array Based on One Column's Values
data = [1:10; 0.3*rand(1,10)].' idx = data(:,2) < 0.1; data(idx,:) = [] The removal of the rows could also effectively be d...

plus d'un an il y a | 0

Réponse apportée
Count number of nucleotide bases (letters) in file with multiple entries
% this is what the attached file contains: type file.txt data = readlines('file.txt'); ID = regexp(data(1:2:end),'>(.*?):...

plus d'un an il y a | 0

| A accepté

Réponse apportée
A simple/efficient way to add one additional xtick, and the corresponding xticklabel, to the existing xticks and xticklabels
plot(1:50) new_tick = 5; ax = gca(); ax.XTick = unique([ax.XTick new_tick]);

plus d'un an il y a | 1

| A accepté

Réponse apportée
Logging cmd in multiple diary
You can restore diary logging to log1.txt after logger2 finishes: logger1(); function logger1() logName = fullfile(pwd,...

plus d'un an il y a | 0

Réponse apportée
I am having trouble constructing a 'for loop'. Can you suggest me on how to modify it?
One thing I notice is that (-A)^i-1 should be (-A)^(i-1) EDIT: that's now corrected in the question.

plus d'un an il y a | 1

| A accepté

Réponse apportée
Reading columns from a poorly-formatted text file
This file looks like a fixed-width file, but it's not quite, because lines 68 and 69 differ in format from the other lines. dbt...

plus d'un an il y a | 0

| A accepté

Réponse apportée
How to change Fontcolor xticks and yticks
Assuming you just want to change the color of the x-tick and y-tick labels: plot(1:10) ax = gca(); ax.XAxis.TickLabelColor ...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Increasing the line width of box plot whiskers
findobj('Tag','boxplot') finds all* objects whose Tag is 'boxplot'. This includes any object whose Tag is 'boxplot' anywhere in ...

plus d'un an il y a | 0

| A accepté

Réponse apportée
I have some code that keeps failing to open and read two csv files out of four. Can someone explain what is wrong with either the code or the csv files
When processing Sample3.csv, post_fun removes every row of table T because index, defined here index = isnan(disp) | isnan(forc...

plus d'un an il y a | 0

Réponse apportée
keyPressFcn on a figure: wait untill the user is done annotating.
Here is a code structure that you can run and add to. n_fig = 2; keyInfo = cell(1,n_fig); ii = 1; while ii <= n_fig ...

plus d'un an il y a | 0

Réponse apportée
Scatter data to smooth line plot
load U_Au_T100 XY = Pos_UI1; scatter(XY(:,1),XY(:,2)) C = mean(XY,1); XY0 = XY-C; th = atan2(XY0(:,2),XY0(:,1)); [~,id...

plus d'un an il y a | 1

| A accepté

Réponse apportée
I need to compare elements that come from different tables
EQID_inter is a numeric array. Bnames_inter.Level is a cell array (whose first element contains the character vector '6000038')...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Trying to understand how imagesc works compared to scatter.
load('imagesc_confusion.mat') Longitude (xlon) varies first in your data: [xlon ylat meantemp(:)] which means as you go down ...

plus d'un an il y a | 2

| A accepté

Réponse apportée
How can I add individual error bars to a grouped bar graph plot?
Replace x = reshape([b.XEndPoints],[nGroups, nBars]); with x = vertcat(b.XEndPoints); Example, using random data: x1 = [2.5...

plus d'un an il y a | 0

| A accepté

Réponse apportée
How to perform a basic division to every x1000 data columns?
load('S.mat') load('spikes_std_mtx.mat') Here is one way: N = size(spikes_std_mtx,2); result = NaN(N,1); for ii = 1:N ...

plus d'un an il y a | 1

| A accepté

Réponse apportée
Unique function to return last duplicate value
"The data is essentially a ramp up and then a 3 second pause then a ramp down and I want to [split] the data into two variables ...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Error: unrecognized function or variable "bi2de"
bi2de is a function in the Communications Toolbox; based on the error message you received, I guess that toolbox is not installe...

plus d'un an il y a | 1

| A accepté

Réponse apportée
Creation of colorbar for given points
% I don't have your image data, so I make % a random matrix to use in imagesc() data = rand(20,20); % read colormap color...

plus d'un an il y a | 0

| A accepté

Réponse apportée
Plotting random number in a line
If you want to plot points on the x-axis, specify the y-coordinates as zero. X = rand(1,100); Y = zeros(1,100); plot(X,Y,'*')...

plus d'un an il y a | 0

| A accepté

Réponse apportée
slow drawing of a set of points on a plane
p = [ cos(0:.1:1.9*pi), -1:.2:1, 0*(-1:.2:1) ; sin(0:.1:1.9*pi), 0*(-1:.2:1), -1:.2:1 ] figure plot(p(1,:),p(2,:),'r.') grid ...

plus d'un an il y a | 0

Charger plus