Réponse apportée
for loop over video data
Does this work as expected? [n_frames,n_rows,n_columns,n_color_channels] = size(data); block_size = 30; n_frames_to_process =...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
I'm getting an error using fplot, How do I get it to work?
Xs = 1.8; fs = 10; fi = pi/3; t1 = -0.1; t2 = 0.2; t = [t1, t2]; x = @(t)Xs*sin(2*pi*fs*t+fi); fplot(x,t,'-')

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
How to display an image and a plot on the same figure while controlling axes
my_image = uint8(linspace(1,0,720)'*linspace(1,0,1280)*255); % some diagonal color gradient angles = linspace(0,4*pi,200); m...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Variable might be set by non scalar operator
m=('insert value'); should be m=input('insert value');

plus de 3 ans il y a | 0

Réponse apportée
Manipulate strings in a table- remove leading numbers if present
load S solution = regexprep(names,'^[\d\.]+\s+','')

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Patch - controlling transition of transparency - how to?
To have all patches span the full transparency range, use normalized values, where each column of fit is normalized separately. ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Why does the line plot depend on the generator type in a for loop ?
The i_subset passed in to make_line_plot.m is a column vector, and that is assigned to generator if mode == 1. Then generator is...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
How can I set zero value to white? in mesh plot
Like Rik said, one option is to replace zeros with NaNs in A; then they won't show up at all (so by default you see the white ax...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to list all situation of vector including fix number?
perms(1:10) https://www.mathworks.com/help/matlab/ref/perms.html

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Find match between 2 tables of unequal length
new_table = B(ismember(B.Name,A.Name),:);

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How can I add this condition on my code?
U = [10;20;30;40;5;60;40;80;20;100]; V = [2;3;4;5;6;7;8;9;10;1]; idx = find(diff([0;floor(cumsum(U/100))])) V(idx) sum(V(i...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Mask with a for loop
removeData([2 3 0 0 7 8 0]) function vec = removeData(vec) x = 1; while x < numel(vec) if vec(x) ~= 0 && vec(x + 1) ==...

plus de 3 ans il y a | 0

Réponse apportée
Unique concatenation of multi-dimensional cell arrays
A(:,:,1) = {[1;2;3],[],[3]; [],[],[4]; [],[2;3],[]}; A(:,:,2) = {[2;3;4],[4],[3]; [],[],[4]; [],[2;4],[]}; ...

plus de 3 ans il y a | 1

Réponse apportée
Monitoring a directory for new files does not catch all the files
new_files will contain the names of all the new files, so instead of using just new_files(end) and assuming there's one new file...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
3D axes ticks get truncated when figure window is not maximized
Set the xticks manually (like you set the xlim manually): xticks(928:933) Maybe the yticks too: yticks(200:100:600)

plus de 3 ans il y a | 0

Réponse apportée
Extract each column in excel spreadsheet and create new workbook with header as spreadsheet name
C = readcell('CatchCount1.xlsx'); for ii = 2:size(C,2) C_new = C(:,[1 ii]); C_new{1,2} = 'Catch'; writecell(C_ne...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
split array to subarray and save it as csv file
fn = 'your\csv\file.csv'; pn = 'folder\where\you\want\the\results\to\go'; n = 6; C = readcell(fn); for ii = 1:size(C,2)/n ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
load different data types from the same subfolder simultaneously
If there is one .mat and one .dat file in each folder, then this should work to get the names (full path names) of each .mat and...

plus de 3 ans il y a | 0

Réponse apportée
How to sum values from unique dates in MATLAB table?
% the original table timestamp = datetime({'20-Jan-2023 15:12:22';'20-Jan-2023 15:12:22';'17-Jan-2023 12:57:02';'17-Jan-2023 13...

plus de 3 ans il y a | 1

Réponse apportée
Using nested loop to enter individual values in a matrix
Basically, you don't need the second input(), after the inner while loop, at all. close all, clear all, clc; % Ask use...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
"Continue" in "for loop" based on trial count
Maybe this: for k = 1 : numel(X_vector) for n = 1 : 5 x = X_vector(k); y = Y_vector(k); % Now u...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Plotting different color points based on array values
data = struct('Name_1',randperm(50)); DE = 2.5+5*rand(1,50); threshold = 5; [~,idx] = sort(data.Name_1); x = data.Name_1(i...

plus de 3 ans il y a | 1

Réponse apportée
EDF writing - error when using cell array as signal DATA
The edwrite documentation doesn't state this explicitly (that I can see), but apparently (according to this answer), if you spec...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
an issue with datetime
Maybe you mean "HH" a = '02/15/2023 13:00:00'; b = datetime(a,'InputFormat','MM/dd/yyyy HH:mm:ss')

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
How to bring a patch to the bottom of a figure?
Option 1: Call fill before plot: figure() hold on c = fill([0 4 5 2 1],[0 0 2 4 3],'y'); a = plot([1 2 3],[1 2 3],'color','k...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Check if a field within a structure exist
for i=1:9 chunk = sprintf('Period_%d',i); if isfield(Data.(chunk),'Breaks') data = xyz; else...

plus de 3 ans il y a | 0

Réponse apportée
Compare two arrays of same length
Maybe something like this: gear = zeros(1,789); for i = 1:789 if FF_one(i) < FF_two(i) gear(i) = 1; elseif ...

plus de 3 ans il y a | 0

Réponse apportée
is this the proper way to convert your axis and graphs to square microns?
Seems ok, assuming that each zone is an annulus and that all zones are concentric.

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How do I properly use the "while", "for", "loop" command in this problem?
Maybe something like this: % A = T(:,1); %Column vector A = [71.213; 74.499; 79.175; 54.163; 83.008; 52.615]; B = length(A...

plus de 3 ans il y a | 1

Réponse apportée
Obtain all table elements from a column which correspond to certain string in another column
% a table str = {'Onus';'Bonus';'Loan us';'On us';'Bonus';'Money';'Bonus'}; num = [1;2;3;2;4;3;1]; t = table(str,num) % get ...

plus de 3 ans il y a | 1

| A accepté

Charger plus