Réponse apportée
Grouping or categorizing data based on conditions
How about this? data = readtable ('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1078835/Outpu.txt'); data = ...

plus de 3 ans il y a | 1

Réponse apportée
How to read several files
files_mat = dir('*.mat'); % your pwd is where mat files are present if not give path N_file=length(files_mat); % total numbe...

plus de 3 ans il y a | 0

Réponse apportée
Error using mesh Z must be a matrix, not a scalar or vector. Error in untitled6 (line 5) mesh(W,Y,Z)
As you have given single value of Z, it would be a line. w = 200:50:450; y=repmat(180,1,length(w)); [W,Y] = meshgrid(w,y); Z...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Sum structures with an array 1x1 each one
Q.O20 = 1; Q.B3 = 2 ; Q0h = Q.B3 + Q.O20 s = sum(cell2mat(struct2cell(Q)))

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to solve simultaneous equation with trigonometric function
You cannot write acos*(2*gamma) and tan*gamma. Note that they are function and they need someinput. It migh be: acos(2*gamma) an...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
finding the maximum within a specific range
T =readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1075965/table.txt') ; NE8 = T.NE8 ; idx = NE8>200 ...

plus de 3 ans il y a | 0

Réponse apportée
How so subset observations in a matrix?
idx = FYEAR >= 2007 & FYEAR <= 2009 ; iwant_FYEAR = FYEAR(idx) ; iwant_GVKEYS = GVKEYS(idx) ;

plus de 3 ans il y a | 0

Réponse apportée
MATLAB fixing dates that are flipped
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1075635/Stacked.xlsx') ; t = datetime(T.(1))

plus de 3 ans il y a | 0

Réponse apportée
Drowsiness detect -- mouth dataset
How about this dataset? https://www.kaggle.com/code/adinishad/driver-drowsiness-using-keras/data

plus de 3 ans il y a | 0

Réponse apportée
Importing multiple data and assigning each columns into different variables
data = readtable("01_Angle.csv"); % or txt.data = importdata("01_Angle.txt"); data = table2array(data) ; You have each variab...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Add element inside cell with combination
A = {[],[1,2],[3,4],[5,6]} ; A = A(~cellfun('isempty',A)) ; % REmove empty cells [I{1:numel(A)}] = ndgrid(A{:}) ; thesum ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
n E Z => sin(n*pi) = -1 ?
n = vpa(100000000000000000000000000000) ; vpa(sin(n*pi))

plus de 3 ans il y a | 0

Réponse apportée
How to plot data from mutiple files in a loop so that all is collated in one figure?
data = cell(length(files),1) ; for k = 1:length(files) % Load data A = fullfile(Folder,files(k).name); dat...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
the program is plotted once, then showing error, is something error in program
You initialize the value of y before for loop. y = zeros(1,n) ; y(1) = 0; func1 = @(y) ((-(s^2)*k/tc)*sin(y - pi/2) + L*(s^2...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Why is this error popping up for this script?
In the loop: i = 0; for v = v1:-0.001:v2 i = i + 1; v = v1:0.001:v2 %<---- this is empty matrix. P(i) = IsentCon...

plus de 3 ans il y a | 0

Réponse apportée
How to get coordinates of largest element in an array?
[val,idx] = max(RHSvec) ; [i,j] = ind2sub(size(RHSvec),idx') ; [i j]

plus de 3 ans il y a | 0

Réponse apportée
Statistical distribution comparison for two datasets
Plot histogram

plus de 3 ans il y a | 0

Réponse apportée
how to plot a line graph between a set of values against a single value
data = [-5 -7 0.81 -7 -4 0.96 -4 3 0.94 -1 6 0.87 5 -3 0.84 3 ...

plus de 3 ans il y a | 0

Réponse apportée
Working on an excel file
Don't use xlsread. Use readtable T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1071595/EXCEL.xls...

plus de 3 ans il y a | 0

Réponse apportée
Using switch to identify even or dd
@cgo You have only two options x can be either even or odd..that's all. x = 4 ; r = mod(x,2); if r == 0 fprintf('%d is...

plus de 3 ans il y a | 0

Réponse apportée
Take average of 1000 to be 100 values
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1071425/LEARN_users.txt') ; clc; T = readtable('h...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How do you rotate an ellispoid?
Proceed something like this: xc=50; %xCenter yc=50; %yCenter a=25; %xRad b=100; %yRad m = 1000; theta = linspace(0,2*pi,...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
convert dates to specific format
t0 = datenum(today) % probably you have datenums t1 = datetime(datestr(t0)) % convert them to datetime t1.Format % check ...

plus de 3 ans il y a | 0

Réponse apportée
How to replace first and last element of each matrix in 7x1 cell with 0
for i = 1:length(cell) cell{i}(1)=0; cell{i}(end)=0; end

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Different dimension matrix addition
Is this what you want? A = rand(2) ; B = rand(4) ; iwant = repmat(A,2,2)+B

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Problem of reading file in triangle_display.m software
You may proceed like shown below. nodes = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1068640/aaa...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Create a slice by a code.
You may consider using this: https://in.mathworks.com/matlabcentral/fileexchange/7173-grabit Extract the points (xi,yi) you wa...

plus de 3 ans il y a | 0

Réponse apportée
I couldn't understand what's wrong in this.
The error is simple. You are trying to save more number of elements in LHS than it is initialized for. Demo A = zeros(1,3) ; ...

plus de 3 ans il y a | 0

Réponse apportée
Downsample and Upsample videos in matlab
Read video frame by frame, and use imresize on each frame.

plus de 3 ans il y a | 0

Réponse apportée
Find minimum in matrice
Let A be your matrix. A(A==0) = NaN ; % replace 0's with NaNs [val,idx] = min(A) Or, use: val = min(A(A>0))

plus de 3 ans il y a | 0

Charger plus