Answered
Copy down cell value until new value and repeat for specific range
If you choose to do this in Matlab, this should get you started. It reads in a spreadsheet named "data.xlsx" as a table and pul...

7 years ago | 0

Answered
Which way is better?
In terms of speed, the 2nd option is 3.0 times faster on average (p<0.0001, Wilcoxon Signed Rank; 1 million individually timed i...

7 years ago | 1

Answered
How to replace values above a given percentile by nans
Here is an alternative function that ignores NaN values. It's not a nice one-liner like Star Striders but it does produce the sa...

7 years ago | 0

| accepted

Answered
Linking two push buttons in Matlab GUI
Here is a complete demo you can run that allows you to drag-and-drop any GUI object that is assigned a KeyPress and KeyRelease f...

7 years ago | 0

Answered
Interrupting a Callback with a Push Button
"Inside the while loop, I want to check whether a certain push button has been pressed" The callback function for the pushbutto...

7 years ago | 1

Answered
how to pick up all combination of numbers from multiple vectors
Here are two solutions for before/after R2023a. Use combinations in MATLAB R2023a or later Starting in R2023a, use the combina...

7 years ago | 0

Answered
How do I show rows and columns from a matrix in a edit texted in MATLAB?
Your matrix does not contains many rows. In fact, it's a row vector so it only contains 1 row. You can see this in your first ...

7 years ago | 0

| accepted

Answered
How to convert cell to cell array of character vectors.
At least one of the elements in btl_data.POLYGON is not a character vector. This demo below recreates the error. A = [48.44, ...

7 years ago | 0

| accepted

Answered
How to name different groupes of variables in one vector with indices of another?
Updated interpretation Generator = [3111 3112 3111].'; mod1 ={'\Delta \omega' '\Delta \delta'}; mod2 = {'\Delta \psi'...

7 years ago | 2

| accepted

Answered
Comparing words in text file line by line
"I got a text file with only one word in each line. How can I open and compare each word from this file with required word in a ...

7 years ago | 1

| accepted

Answered
insert text as watermark in video( one frame)
Based on the error message, it appears that "block" is an [m x n x 1] array (or simply, [m x n]). You're accessing "block" in a...

7 years ago | 0

Answered
How do I associate specific colors with specific numbers of a matrix?
You set 9 colors in your colormap but you only have 6 unique intergers in "A". That means you're asking matlab to distribute 9...

7 years ago | 0

| accepted

Answered
Insert missing date and corresponding values in a matrix?
If you're looking for timelines that contain segments of start/stop times, here's a method. data = { '03-Jan-2018 16:58:09' '0...

7 years ago | 0

| accepted

Answered
How to Remove Rows in Table
Read in the data; determine which rows are empty under "LikesAnimals"; then remove those rows. t = readtable('data table.xlsx...

7 years ago | 1

| accepted

Answered
App Designer: Radio buttons that prompt User input (Novice)
In the "selection changed" callback function to the radio buttons group, you can ask the user for more information using the inp...

7 years ago | 0

Answered
How to enable a figure so that if I click on a point and it will show the value?
Active "data tips" and then you can click on any plotted coordinate to return the (x,y,z) values. From r2018b to present, the to...

7 years ago | 2

| accepted

Answered
Problem with dropdown itemdata propiety
If you're using ItemData, the "Value" property will return the ItemData associated with your selection and it will be in the for...

7 years ago | 0

| accepted

Answered
Create pie chart in if loop
From the documentation, "pie(X) draws a pie chart using the data in X. Each slice of the pie chart represents an element in X." ...

7 years ago | 0

Answered
How to display a vector in edit text in MATLAB?
Vi=[0 0 1 0 0 1 1 0 0 0 0 0]; >> s = ['Vi[',regexprep(num2str(Vi),' +',' '),']'] s = 'Vi[0 0 1 0 0 1 1 0 0 0 0 0]'

7 years ago | 0

| accepted

Answered
N-way ANOVA giving NaN and Inf
According to the documentation, "By default, anovan treats all grouping variables as fixed effects." Your grouping variables do...

7 years ago | 1

| accepted

Answered
How to find the area of an image and display the output in the GUI?
Answer to first question: (Summarized from comments under the question) The error is due to improper input to imread(). The e...

7 years ago | 0

| accepted

Answered
Normalization of colorbar showing bincounts of binscatter
I would use histcounts2() to determine the density within each bin. Then you can normalize those data and send it into histogra...

7 years ago | 2

| accepted

Answered
how to draw map in app designer?
There is no axes input to the worldmap function (unfortunately). The function will create a new figure to display the map. Aft...

7 years ago | 2

| accepted

Answered
How to extract certain files according to numbers in the filename?
n = 3; % for month #3 filename = sprintf('bar_%dpressure.xlsx', n) Result filename = 'bar_3pressure.xlsx'

7 years ago | 0

| accepted

Answered
Storing Matrix in Workplace on each iteration
"How can I ... a) saves a matrix(i) on each iterration as a value in the workplace" What I think you mean is to store each iter...

7 years ago | 1

| accepted

Answered
Error "Subscript indices must either be real positive integers or logicals." At random index
Indexing requires positive integer values just as the error message indicates. At lease one of the three indices of X is not a p...

7 years ago | 0

| accepted

Answered
Numerical errors in corrcoef
When you plot the results against each other (code below), the pairs all fall along the diagonal but with tiny aberrations that ...

7 years ago | 3

| accepted

Answered
How to decompose and expand a vector into ones
" I = [2, 2]' How can I multiply that by 12 and get a 1x48 vector filled by ones ?" My interpretation: you want to multiply (o...

7 years ago | 0

| accepted

Answered
Find the cell where the sum equals a threshold
Compare the cumulative sum against your threshold. The line below returns the first index of A that is greater than or equal to...

7 years ago | 0

| accepted

Answered
Matching values in different columns?
If you have r2019a, use groupcounts(). %Original data A= [10 13 10 1 111 102 10 13 7 10 112 100 14 116 102 10 14 120]; B= [2...

7 years ago | 0

| accepted

Load more