Risposto
Tornado chart with colormap gradient
jet is a function that takes up to 1 input argument (the number of colors - call it N) and returns a colormap (which is an N-by-...

10 giorni fa | 0

Risposto
How to append Nested cell array to .csv file
"I have attached the .txt file here which need to be read and written in a new file. Issue is i have 5000 such files which needs...

10 giorni fa | 0

Risposto
Matrix versus Scalar Input Into Functions Using Symbolic Toolbox
% What it should be qA = A.^2 + 2*A + 15 ; % ^^ element-wise operation

11 giorni fa | 1

Risposto
Hello everyone! So i am kind of new to MATLAB. I created a UI with tabs, however when i maximise the UI figure, the tabs do not resize along with it. How can i manage this? Thank you in advance.
It seems like having AutoResizeChildren set to 'on' (which is the default) conflicts with positioning children whose Units are '...

11 giorni fa | 0

Risposto
How to Reshape a Matrix into a Cell
% 821x9 matrix (filled with integers for illustration) M = reshape(1:821*9,9,[]).' % convert to the required cell array C = n...

11 giorni fa | 0

Risposto
Hello, All. Thank you in advance for any help, contribution and your time. I have been asked to do a contour plot with a data vs time (date and month), the data is like ID.ST
Maybe something like this would work: % read the file into a cell array C = readcell('data.txt'); % make that cell array into...

11 giorni fa | 0

Risposto
Axis does not plot in app designer
You are plotting scalars: plot(app.grafica_pwm, muestra(i), H2 * 100, muestra(i), H1 * 100) scalars don't show up unless they ...

11 giorni fa | 1

| accettato

Risposto
Sort table into 2 tables
T = readtable('instruct_04152024_update.csv'); disp(T) idx = ismember(T.user_id, T.user_id(T.score == T.max_score)); T1 = T(i...

11 giorni fa | 0

| accettato

Risposto
How to read the data in app design.
The problem is that you are storing each "Number of Bags" edit field as app.EditField_1. That is, you give them all the same nam...

11 giorni fa | 1

| accettato

Risposto
How to have a different interval between xticks and xticklabels on a datetime plot?
"xtick mark appearing at each midnight, but an xticklabel (i.e. date info) appearing every other midnight" Using xtickformat se...

11 giorni fa | 1

Risposto
Reading multiple .txt files and plotting a graph
% folder where your txt files are your_folder = '.'; % get info about all .txt files in your_folder (use 'S*.txt' instead %...

11 giorni fa | 1

| accettato

Risposto
IF statement if == "A variable" not working
"The IF statement not working when I use IF == b, but works with IF = 99999" The behavior is not the same when using b vs when ...

12 giorni fa | 0

Risposto
Error using / Matrix dimensions must agree app designer
Use ./ instead of / <https://www.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html>

12 giorni fa | 1

| accettato

Risposto
Printing sentences using cell arrays
Here's a way to generate multiple random sentences at once: Names={'Harry','Xavier','Sue','Howard','Fred'}; % adding two names ...

12 giorni fa | 0

Risposto
How to put existing figures in one figure together?
% open the fig files in two new figures f1 = openfig('fig1.fig','invisible'); f2 = openfig('fig2.fig','invisible'); % get t...

12 giorni fa | 0

| accettato

Risposto
How to Get one Property of a Structure Array Using a Property on the Same Line
name = 'deuterium'; % name of the isotope you want the mass of idx = strcmp({isotopicMasses.name},name); mass = isotopicMass...

12 giorni fa | 1

| accettato

Risposto
how to use sprintf to an array ?
Yes, it is possible. However, your sprintf format specification has 5 formatting operators (all %d), but you only have 3 number...

12 giorni fa | 0

| accettato

Risposto
I am having trouble reading textfile data into my app using uigetfile and readtable functions in appdesigner. Kindly assist
All of the IAA_1 app's properties that are passed to the second app (T_wout, T_win, Sr, etc.) are initially empty []. You can e...

12 giorni fa | 0

| accettato

Risposto
How to filter table by variable ?
jointbase = jointbase(ismember(jointbase.VariantID,VariantIDPassed),:)

12 giorni fa | 0

| accettato

Risposto
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...

13 giorni fa | 1

Risposto
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...

14 giorni fa | 0

| accettato

Risposto
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...

14 giorni fa | 0

| accettato

Risposto
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

14 giorni fa | 0

| accettato

Risposto
result is displayed in the same line
Use \n instead of /n. \n means new line; /n means literally /n.

14 giorni fa | 0

| accettato

Risposto
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...

14 giorni fa | 0

| accettato

Risposto
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), ...

15 giorni fa | 0

Risposto
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...

15 giorni fa | 0

| accettato

Risposto
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...

15 giorni fa | 0

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

15 giorni fa | 1

| accettato

Risposto
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})....

15 giorni fa | 0

| accettato

Carica altro