Réponse apportée
Is there a way to set the default behavior for `format` statement?
https://www.mathworks.com/help/matlab/ref/startup.html

environ 3 ans il y a | 0

Réponse apportée
combining two histograms by category
Data = readtable('worksheet1.xlsx'); % histogram 1 group1dx = startsWith(Data.mode,'Active'); group1Data = Data{group1dx,...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How can I make a textbox selectable?
One way to set the Selected property via mouse click is to define a ButtonDownFcn for each textbox. For example this will allow...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Fixed plot and variable-loop plot
One way would be to create the variable line once before the loop, and update its YData inside the loop. % some random rh: rh ...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
How do I create a 3D plot using the messgrid command from data within an Excel file?
data_epp=readtable('Epsilon_Prime.xlsx'); % reads data x=data_epp{1,3:end}; % temperature(C) y=data_epp{2:end,1}; ...

environ 3 ans il y a | 0

Réponse apportée
Use imhist in tiled layout
You're right, imhist doesn't seem to be very compatible with tiledlayout. Here's a workaround that might work for you: % B = i...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Compare two strings from unequal length cell array and assign value
load('EXAMPLE.mat') [~,idx] = ismember(shortStranglePositions(:,6),callSymList(:,1)); shortStranglePositions(:,8) = callSy...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How can I change the color of the slices in my pie chart?
TT = 10; RT = 25; TN = 2; RN = 3; R = [RT , RN]; T = [TT , TN]; subplot(2,2,1) R_Pie = pie(R) Notice the elements of R_P...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
add column in table
G = struct('ones',{1 1 1 1},'twos',{2 2 2 2}); % for example T= struct2table(G); c=1:height(T); % use height c=c'; T.new_c...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Replace matrix elements with zero apart from specific vectors
N1 = [2 3 5]; N2 = [7 11 13]; N3 = [17 19 23 29]; x = [0 2 3 5; 7 11 13 6; 4 5 6 7; 17 19 23 29] Rather than replacing unw...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
need longer items in listbox names to display in a label
See the attached m-file for a simple example of how to do this.

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Creating subplots based on a cell array
cell1 = {'AA' 'AA' 'BC' 'BC' 'BC' 'DD' 'DD'; 1 2 3 4 5 6 7; 7 6 5 4 3 2 1; 5 9 8 7 6 5 4}; cell2 = {'AA' 'AA' 'BC' 'BC' 'BC' 'D...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Error with uigetfile in App Designer when changing directories
Use the full path, not just the file name: comp_fn = readtable(fullfile(path,file));

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Hello, I have a table contains the calendar day of the year and 24-hour frequency. How to get daily max, min, and average temperature from the table?
Here's one approach: % a table similar to yours, with only a few days, and only the relevant columns: t = table(repelem({'2005...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
index exceed matrix elements
Replace this: L=length(data); with this: L=size(data,1); length(data) gives the size of the longest dimension of data, which...

environ 3 ans il y a | 0

Réponse apportée
How can I index through logicals?
Construct table T: A = randi([0, 1], 5, 5); vert = reshape(A(:,1:3),[],1); Types = {'A', 'B', 'C', 'D', 'A', 'B', 'C', 'D', '...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to increase text size for asterisk for significant data
R=randn(30,2); R(:,1)=R(:,1)+3; boxplot(R) set(gca,'XTick',1:2,'XTickLabel',{'A','B'}) H=sigstar({{'A','B'}},0.01); ylim([-...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to plot a line with one equation for the y-axis and three variables for x-axis
n = [50; 100; 200]; % you can avoid the complex conjugate transpose (') and just construct a column vector using ; instead of , ...

environ 3 ans il y a | 0

Réponse apportée
combining 3 graphs from different codes.
Try the modified run.m file attached. I added a for loop to loop over the three .mod files (you'll have to supply their names), ...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Need an Elegant Sorting Solution for Directory File Names
filenames = { ... 'cdef2.20140101.pdef.txt'; ... 'cdef2.20140102.pdef.txt'; ... 'pdef.gdef.20130101-20130105.txt'...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
why do we initialize any vector or matrices with zero.
https://www.mathworks.com/help/matlab/matlab_prog/preallocating-arrays.html

environ 3 ans il y a | 1

Réponse apportée
How do I change the color for a plot in a for loop?
In order for 'MarkerFaceColor' and 'MarkerSize' to have any effect, you must plot with some marker specified. First, with no ma...

environ 3 ans il y a | 1

Réponse apportée
How do I extract table data from a .mat file given user input?
app.UITable.Data = loadedFile.(choose); https://www.mathworks.com/help/matlab/matlab_prog/generate-field-names-from-variables.h...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Remove Frequency Label bodelplot
@J B, @Benjamin Gelzinnes: Apparently, the XLabel of a Bode diagram created with bodeplot belongs to an axes whose HandleVisibil...

environ 3 ans il y a | 0

Réponse apportée
Adjusting the height of mathematical symbols in Matlab
This may help get you closer to what you want: clear all ; clc ;clf set(gcf,'color','w') %% x = 1 : 0.01:10 y = sin(x) plo...

environ 3 ans il y a | 0

Réponse apportée
Writing code to calculate a function for any user input array
How about something like this? Nvt = numel(vt); NPA = numel(PA); Nn = numel(n); Nisa = numel(isa); Nd = numel(d); Nhp = nu...

environ 3 ans il y a | 0

Réponse apportée
How to plot numbers on Tornado Chart?
clear all close all clc % Names of the Y axis ticks names={'Feedstock cost'; 'Fixed Capital Cost'; 'IRR'; 'Fixed Operatin...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to add error bar in Barchart Matlab
% data model_series = [5815 2178 4898 1265 773 833 232 2190 189; 6246 0 3540 1164 421 0 90 672 189]; model_error = [872 326 ...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to Switch order of Boc plots
In order to swap the first boxchart ("Adaptive") with the third boxchart ("No Tag"), swap their xgroupdata (which is the first a...

environ 3 ans il y a | 0

Réponse apportée
How to save a struct into a excel sheet one specifically?
Use the 'Sheet' argument in writecell. fn = 'your_excel_file.xlsx'; % writing some simple cell arrays because I don't know w...

environ 3 ans il y a | 1

| A accepté

Charger plus