A répondu
How to filter table by variable ?
jointbase = jointbase(ismember(jointbase.VariantID,VariantIDPassed),:)

10 jours il y a | 0

| A accepté

A répondu
How to add a cumulative constant to all values on each row of a matrix, starting from the bottom row and ending at the top row?
c = 0.5; A = [1,2,3;1,2,3;1,2,3] One way: N = size(A,1); result = c*(N:-1:1).'+A Another way: N = size(A,1); result = cum...

11 jours il y a | 1

A répondu
ls syntax for output variable with flags
% save a bunch of mat files x = 1; for i = 1:26 save([char(64+i) '.mat'],'x'); end % use multiple arguments to ls li...

11 jours il y a | 0

| A accepté

A répondu
One out of two of my tabs will not respond and update after initial run of data acquisition
I'm attaching an app that does kind of a simplified version of what I think your app is meant to do. You can select from multip...

12 jours il y a | 0

| A accepté

A répondu
How do I store all values of a loop in a vector?
x = zeros(1,100000); for i=1:100000 x(i)=randi(6)+randi(6); end

12 jours il y a | 0

| A accepté

A répondu
result is displayed in the same line
Use \n instead of /n. \n means new line; /n means literally /n.

12 jours il y a | 0

| A accepté

A répondu
How to convert X, Y, Z cartesian coordinates into a surface.
load('cone_data - Copy.mat'); Here's how the surface looks. This is using the matrices x_coords, y_coords, and z_coords. % a s...

12 jours il y a | 0

| A accepté

A répondu
Subplot x-axis
Remove axis equal. Shift the rectangles and texts to the left by 7. Increase the width of the x-limits by 1 (0.5 on each side), ...

13 jours il y a | 0

A répondu
How to create for loop for calculating angle between 3 3D points?
p = data3D(1:3); % pt1 q = Coordinates; v = q-p; % vectors from pt1 to each point in Coordinates N = size(q,1); angles = z...

13 jours il y a | 0

| A accepté

A répondu
How to rewrite code without nested loops
% Prompt for user input r = input("Enter r: 0.0 to 4.0: "); x1 = input("Enter initial x: 0.0 to 1.0: "); N = 100; % numbe...

13 jours il y a | 0

A répondu
Removing peaks less than threshold
Try using MinPeakHeight and/or MinPeakDistance in findpeaks, instead of MinPeakProminence. You'll likely be able to entirely avo...

13 jours il y a | 1

| A accepté

A répondu
Structure For loop: moving sections of one structure to another structure with indexing variables.
for Seg = 1:length(Segments) for Tri = 1:length(Trials) Col.(Trials{Tri}).(Segments{Seg}).a = IMU.(Segments{Seg})....

13 jours il y a | 0

| A accepté

A répondu
find function not working with double inequality
This is not the correct way to check multiple inequalities: indf = find(signal_freq-b<CenterFreqs<signal_freq+b); Instead do:...

13 jours il y a | 1

| A accepté

A répondu
I need to draw the annexed Excel draw with MATLAB code
x = [-5.5,-5,-4.5,-3.5,-2.5,-1.5,0,1.5,2.5,3.5,4.5,5,5.5]; y = [-0.002,-0.004,-0.005,-0.008,-0.008,-0.014,-0.014,-0.014,-0.008,...

13 jours il y a | 0

A répondu
Omit nans from data set when calculating weights
You can use fillmissing to replace any NaN with 0, so that it doesn't contribute to the weighted sum. Give the resulting timeta...

13 jours il y a | 0

| A accepté

A répondu
After using "shading interp", the image will cover my satellite basemap. How to solve it?
Try applying the shading only to the pcolorm surface object: t=pcolorm(double(Latitude), double(Longitude), Precip_ZN, 'FaceCol...

13 jours il y a | 1

| A accepté

A répondu
How do I load in multiple datasets from multiple folders?
You can use * and/or ** wildcards in dir. Example: folder = 'absolute\or\relative\path\to\folder\3D\amplitude'; dir_str = f...

13 jours il y a | 0

A répondu
Why does it skips the if part?
MATLAB doesn't ignore the if statement; the condition is never true. You can print the values of G(1,i) and G(1,i-1) with more ...

13 jours il y a | 0

A répondu
How to dynamically change name of table?
One way to plot the table data for each cycle separately, without having to create a new table variable for each cycle, is to us...

14 jours il y a | 0

| A accepté

A répondu
How to scatter plot
"It is because my X is a 1x16 double and my Z is a 1x32 double." That's true. That is the problem. "When i do [X1,X2], it just...

14 jours il y a | 0

| A accepté

A répondu
Two y-Axes plot order and legend issue
With yyaxis, I don't think there is a way to set which axes' lines show up in front of the other. However, a workaround is to cr...

14 jours il y a | 0

| A accepté

A répondu
Want to extract the earliest date for each subject
groupsummary(X,'SubjNum','min','Dates')

14 jours il y a | 0

A répondu
Average of Column in matlab.
avg = mean(M,1); where M is your matrix.

14 jours il y a | 2

| A accepté

A répondu
How can I plot multiple Matlab files onto one boxplot?
One problem is that you are assuming the list of files returned by dir is in a particular order (7, 8, 9, 10), but in fact the o...

15 jours il y a | 0

| A accepté

A répondu
write matrix, appending data
Instead of writecell([C,filename,'Sheet',Tag,'Range','A',nextI-1]); writematrix([ppm_data', filename,'Sheet',Tag,,'Range','A',...

15 jours il y a | 0

| A accepté

A répondu
Adding Means to a matrix
Like this? D = rand(500,30); % data M = mean(D,1); % mean of each column of data whos D M % add each column to its mean: ...

15 jours il y a | 0

A répondu
TiledLayout with titles spanning multiple tiles (but not all)
Here's one way, using nested tiledlayouts: figure('Position',[10 10 800 600]); colors = [0 0.6 0; 0.9 0.7 0.1; 1 0.4 0.2; 1 0 ...

15 jours il y a | 1

| A accepté

A répondu
How to make a dropdown menu
"I was having problems where only the invalid selection was being made" That's because, in the words of the uicontrol propertie...

15 jours il y a | 0

A répondu
Ploting multiple traces with different colors. plot(x,y, 'color', 'red') not working
'color' is not a valid parameter to pass to rfdata.plot https://www.mathworks.com/help/rf/ref/plot.html Try setting the color ...

15 jours il y a | 0

| A accepté

A répondu
Find faster way than compose to format table
Rather than trying to find a faster alternative to compose to convert table data to appropriately formatting strings, the real p...

15 jours il y a | 0

Charger plus