Réponse apportée
Concatenate cell array inside a cell array
C = {rand(1,7),rand(1,4),rand(1,3)}; disp(C); num = cellfun(@numel,C); N = numel(C); M = NaN(N,max(num)); for ii = 1:N ...

presque 3 ans il y a | 0

Réponse apportée
Regex for string match
I think it may be tricky to get this to work for any possible expression the user may enter, because every special character use...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Error using plot Vectors must be the same length.
You assign to Aplha_IMU(n) but it should be Alpha_IMU(n) (Similarly for Aplha_IMU(1), but that's not the cause...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How do I extract only the numbers after (DATE TIME DOY ABKX ABKY ABKZ ABKG ) in the txtfile
T = readtable('table.txt','NumHeaderLines',26,'VariableNamesLine',26)

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I replace random elements of a matrix with some definite respective values in a single line command?
"I want to randomly replace some elements with some numbers by one single line command" A=[1 2 3;4 5 6;7 8 9]; n = 6; ...

presque 3 ans il y a | 0

Réponse apportée
change the legend of a pie chart
matrix_new = importdata("matrix_new.mat"); % import labels = matrix_new(:,1); percentages = matrix_new(:,2); figure p = ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Plotting 'HH:MM' format times against the X axis
times = (0:24*6-1)*10 speeds = rand(size(times)); lw = 2; legv = 11; dateTimes = datetime(2011,12,24,0,times,0, 'Format','...

presque 3 ans il y a | 0

Réponse apportée
Using accumarray to organize large CSV
"my goal is to have separate variables or columns in a table that show d18O and DATE for each SITE NUMBER and DEPTH" Something ...

presque 3 ans il y a | 0

Réponse apportée
Trouble concatenating a cell.
Here's one way to make a table out of it: % a cell array like yours: tst = { ... "n"+string(randi(10,4,1)),zeros(4,1),ran...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
The function textscan is problematic and has serious bug!
The problem is due to errors in the sliceBad.txt file, like these on line 391: 0.2848764-119 0.1045924-120 0.1045924-120 0...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Merging multiple graphs in the same tiled layout
I gather you have figures already saved, whose tiles you want to combine in the way you describe. %Meaningless values for graph...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
create an increasing series
r = 0.2; n = 25; m = 5; V = m*r.^(2*(0:n-1)); S = cumsum(V); format long g disp(S.')

presque 3 ans il y a | 2

| A accepté

Réponse apportée
.csv using readtable doesn't make difference between the value 1 and 01
fn = '23_Time Cards_Practice 1.CSV'; opts = detectImportOptions(fn); % tell readtable to read NUMBER column as char, not n...

presque 3 ans il y a | 1

Réponse apportée
Error using slice: Too many input arguments
Runs OK for me in R2022a. Maybe you have another function called "slice". Check this on the command line: which -all slice

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Why does my it keep saying error on the input line?
You should use the 's' option in input() to avoid interpreting the input, e.g., input A will be stored as the letter A rather th...

presque 3 ans il y a | 0

Réponse apportée
Plotting implicit functions via fimplicit
Apparently (this behavior appears to be undocumented), you can pass a cell array of function handles to fimplicit, as in: L = 5...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to use arrayfun to create an array whose value are relating to index?
function val = pixel_replication(img, x, y) val = img(nearest(x), nearest(y)); end function u = nearest(v) l = flo...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
writecell writes empty value for the first row in a for-loop
@Shae Morgan: I think @dpb is exactly right with his comments - the root cause of the problem is that the edit box Value is not ...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
pie chart not complete - a pie is missing
The pie chart is incomplete because the numbers in your variable "percentages" do not sum to 1. They sum to 0.91, so you get a 9...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
how catch number in "()"
f={"1A(12)","cB(34)","4C(23)"}; C = regexp(cellstr(f),'\((.*)\)','tokens','once'); C = [C{:}] N = str2double(C)

presque 3 ans il y a | 1

| A accepté

Réponse apportée
fixed point iteration and plotting iteration
Assuming the sequence is defined as in your other question, here's something: T = @(xy)xy([2 1]).*[-1 1]; n_iterations = 20; ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Plotting and calculation of iteration of fixed point
Here's something: T = @(xyz)-0.5*xyz; lambda = 0.5; n_iterations = 20; xyz = zeros(n_iterations+1,3); xyz(1,:) = [3 2 1];...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Increase size of array within cellfun
cellfun performs a loop internally, so I think an explicit for loop in this case is fine. However, if you want to use cellfun, ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Calculation of a column
To = 288.15; % Temperature in ISA [K] % pre-allocate Ta to be the same size as Altitude (53x1), with all elements 216.65 Ta ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
insert two vertical axes (left and right) into the same bar graph
load CountArray_1.mat CountArray = CountArray_1; x = CountArray(:,1).'; y = CountArray(:,2); % x = CountArray(:,3).'; %...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
extracting specific values from a mat file
First load the two mat files you have. Then index into the 13299x1 variable using the 1723x1 row index variable, creating a new ...

presque 3 ans il y a | 0

Réponse apportée
Variable layer thickness using loops
% Make VSP G-mat for arbitrary sensor depths and non-uniform layer thicknesses clear; close all; clc set(0,'DefaultAxesLin...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Detect figure or uifigure from the handle?
Where f is your figure or uifigure handle: matlab.ui.internal.isUIFigure(f)

presque 3 ans il y a | 3

Réponse apportée
I am trying to use nested for loops to analyze average RT and Acc for each condition for each participant.
T = readtable('data.txt') T_summary = groupsummary(T,{'ParticipantID','ConditionID'},'mean') T_summary is a table containing t...

presque 3 ans il y a | 0

Réponse apportée
I have to do a program to change the plot w.r.t Slider value . But how slider value will go again in formulas so we will get updated plot.
Here's one way. The idea is to separate the GUI code from the calculation code, with the calculation code going into the slider ...

presque 3 ans il y a | 1

| A accepté

Charger plus