Answered
how catch value in node tree
You have to see whether the node is included in the tree's CheckedNodes. ismember(app.NozionaleNode_2, app.Tree_2.CheckedNodes)...

2 years ago | 1

| accepted

Answered
Open and reformat data from txt file
(EDIT to clarify: This is answering the original question asked, about reformatting a text file, not the subsequent question abo...

2 years ago | 0

| accepted

Answered
Contradiction of variable existence
Use: ~exist("strF","var")

2 years ago | 1

| accepted

Answered
Kindly guide me how to add the panel for input values of app designer
In Design View, Select Panel in the Component Library on the left-hand side. Click somewhere in your uifigure to place the pan...

2 years ago | 0

Answered
Creating a scatter plot with patch
"I wondered if there might be something similar between patch and scatter" I would expect so. See this: https://www.mathworks....

2 years ago | 1

| accepted

Answered
Issue with saving the image
You might try making the figure larger before saving, e.g.: f.WindowState = 'Maximized'; saveas(f,'Figure_001','bmp') and/or ...

2 years ago | 0

| accepted

Answered
Count percentage of certain number in struct
% something similar to your 1x120 struct: S = struct( ... 'condition',num2cell(logical(randi([0,1],1,120))), ... 'acc...

2 years ago | 2

| accepted

Answered
Algorythm for Average of excel data
Maybe something like this: filename = 'S1IA.csv'; T = readtable(filename); T.Time = seconds(T.Time); T = table2timetable(T,'...

2 years ago | 0

Answered
Help with index for maximum value
The easiest way to fix this is to use the second output from max, which tells you the column index in frac of each element of ma...

2 years ago | 0

| accepted

Answered
Editing csv data and convert it into a table
filename = 'EnergyLIS.csv'; out = importdata(filename); out(2:end) = strrep(out(2:end),',"','/'); out(2:end) = strrep(out(2:e...

2 years ago | 2

| accepted

Answered
How can I mirror a plot from a specific x axis.
x=[ 0.00630656 0.00615694 0.00602694 0.00593928 0.0058094 0.00566972 0.00552689 0.00523467 0.00493265 0.0045527 0.004...

2 years ago | 0

| accepted

Answered
Is there any method to specifically point few operating points in 3D surf ?
Maybe this is helpful: % make a surface using surf() N = 10; X = 1:N; Y = 1:N; Z = peaks(N); surf(X,Y,Z) % pick some po...

2 years ago | 0

Answered
Finding the maximal value in a matrix, within a specific column, and show the value in the output.
D(:,4) is a table (consisting of one column - the 4th column of D), not a numeric array; that's what the error is trying to tell...

2 years ago | 0

| accepted

Answered
Unable to resolve the name Error
This mat file contains one variable (called "exp1_014_mat_saving1"): S = load('triangle2.mat') which is a struct with fields I...

2 years ago | 0

| accepted

Answered
Error too many input arguments using equals equals
"I tried having it be a table and got different errors" Let me keep both want and roster as tables. want = table({'ADNI1';'ADN...

2 years ago | 0

Answered
How to display the value of a variable in real time in a uitable through appdesign
"I know it can be added to myScript through uitable and set, but I just want to do it through appdesign[er]" It works the same ...

2 years ago | 0

Answered
How can i plot this equation using surface plot in Matlab?
W=0.34e-3; Lambda=0.15e-6; t=400e-9; j0=1; x = linspace(-W/2,W/2,100); jxy = NaN(1,numel(x)); idx = abs(x) < W/2-Lambd...

2 years ago | 0

| accepted

Answered
Extracting a variable from a series of files contained inside a folder
% the folder which contains 10 .mat files file_path = '.'; % the name of the variable to load from each .mat file variable_...

2 years ago | 0

| accepted

Answered
How do I make this type of graphics, is it with scatter? For your answers, thank you!
Looks like a surface to me, with NaNs in the data where the plot is white, showing the axes beneath the surface. Adapting the c...

2 years ago | 1

Answered
How does the zoom out feature work?
Two things to be aware of: You can't click-and-drag with zoom out, i.e., you can't select a region that's larger than the curre...

2 years ago | 1

Answered
How can I change a prompt based on the input from another prompt?
Use sprintf to construct the prompts, and store the user-inputs in a variable of an appropriate class (I'm using a cell array he...

2 years ago | 0

Answered
Nonlinear colormap for data that diverges
How about something like this: %Simple Model of divergent data X = linspace(-2,2,801) + 0.002; Y = linspace(-2,2,501) + 0.002...

2 years ago | 1

| accepted

Answered
How to make latch switch
Try the attached m-file. See if it works as expected and makes sense.

2 years ago | 0

| accepted

Answered
How to fill in a zeroes matrix using data from a separate array.
Here's one way to do that, demonstrated with smaller matrices: % a 3x2 matrix of precedence requirements, in lieu of your 121x2...

2 years ago | 2

Answered
Converting a cell array to excel file using write table - how to add headers and sheet name?
filename = 'THRESH_DATA.xlsx'; sheetNames = string(2000:2022); % replace this with the variable names you want: varNames = ...

2 years ago | 0

| accepted

Answered
cell2mat not working
If the contents of the cells cannot be concatenated into a matrix, then you'll get an error telling you so. For example: C = {...

2 years ago | 0

Answered
how would i make the calculator shown use functions
Do you want to call functions instead of hard-coding num1+num2, num-num2, etc.? S = struct( ... 'function',{@plus,@minus,@...

2 years ago | 0

Answered
How to put linspace data into if statement
Use logical indexing: phase = NaN(size(theta)); idx = (0 <= theta) && (theta <= pi); % compression phase(idx) = 1; idx =...

2 years ago | 0

Answered
Weird UITextArea behaviour working with Strings
"It seems the action of clicking has split the long string into individual entries now." Yes, apparently clicking in a uitextar...

2 years ago | 1

| accepted

Answered
Reading ping output using readtable
Here's one way to get the timestamps and times directly out of the file (without using readtable): format longg filename = 'te...

2 years ago | 1

| accepted

Load more