Answered
How to set ylim in axes in GUI ?
ylim(h,[a,b]) % h: the axis handle % [a,b] the limits (a<b) https://www.mathworks.com/help/matlab/ref/ylim.html Make sur...

7 years ago | 1

Answered
How to get values of X,Y,Z when i point courser on the graph
Method 1: use data tips % Create demo scatter plot x = linspace(0,3*pi,200); y = cos(x) + rand(1,200); sz = 25; c = linspac...

7 years ago | 0

| accepted

Answered
Code for an equation
y = (3.5.^(-.5*x)).*(cos(6*x)); % ^ dot

7 years ago | 2

Answered
How to concatenate table variables with underscores in their name
No loop needed. Just list all of the table headers, pull out the ones that take the form "B#_1_3", and then create a matrix bas...

7 years ago | 1

| accepted

Answered
how to covert negative samples of sine wave into positive?
To shift the sin curve upward so that it's minimum value is not negative, x1 = sin(x) - min(sin(x(sin(x)<0))); Another way to...

7 years ago | 0

Answered
How to send email reminders using sendmail
Is that a 3rd party function or are you refering to sendmail()? It is not possible to set the send-date using sendmail(). The ...

7 years ago | 0

| accepted

Answered
Averaging values of unique ID's with duplicated dates
We can't run your code since we do not have access to the csv file. We'd benefit more from having a mat file containing the tab...

7 years ago | 1

| accepted

Answered
Delete columns of a matrix based on values in other matrix
Replaces identified rows with zeros. % Example data that match the indices in your question M1 = rand(10,10); M1(:,2) = 1:10;...

7 years ago | 0

| accepted

Answered
Read dada from a file
Attached is the text file you described named xyz.txt. % Read in the file t = fileread('xyz.txt'); % Split text where '>' ...

7 years ago | 1

| accepted

Answered
How to align axes to a point on another figure
The problem is that axis positions are in figure space (relative to lower left corner of the figure) while the data point coordi...

7 years ago | 0

| accepted

Answered
Find first non-NaN in each column of array & combine into one vector
X = [2 NaN NaN NaN 4 6 NaN NaN NaN NaN NaN NaN 5 4 7 8]; X(cumsum(cumsum(~isnan(X)))~=1) = ...

7 years ago | 3

Answered
x-axes are not coincident using multiple axes
(Copied from comments section) I'm wondering the same thing Jan asked. It should look something like this: ax2 = axes(......

7 years ago | 1

| accepted

Answered
Extracting Data from Cells
I think this is the format of your data: C = {rand(20,4),rand(15,4),rand(22,4)}; Extract the first 3 columns of cell 2 C{2}(...

7 years ago | 1

Answered
How can I display greek letters as boxplot labels?
Use ASCII codes figure boxplot([(1:2:10)',(1:2:10)']) set(gca,'xticklabel',{['A ' char(955)], ['B ' char(961)]},'fontsize', 1...

7 years ago | 0

| accepted

Answered
Using MATLAB GUI popup
Presumably you have a callback function for the checkbox that controls the "enabled" property of the popup menu. Within that ca...

7 years ago | 0

Answered
Where are all drawn shapes stored from an axis?
Store handles In the block below, r1, r2, & r3 are handles to the 3 rectangles. figure() r1 = rectangle('Position',[0 0 2 4]...

7 years ago | 0

| accepted

Answered
Multiple axes: how to plot the correct scale on both x-axes and y-axes?
The double ticks are due to the axis 'Box" property set to 'on' and the misalignment of ticks between the upper and lower axes (...

7 years ago | 1

| accepted

Answered
sigma deletes the axis grid
Short answer: You need to add the grid after calling sigma(). Long answer: Assuming you're using the DynamicSystem method (to...

7 years ago | 1

Answered
help for fprintf my code
"I would like make fprintf to show me t and m as colums" ...where t is an [1 x n] vector and m is a [n x 4] matrix. fprintf('...

7 years ago | 1

Answered
How to convert 1.35678e-01 to numerical digits in matalb?
" I need it in normal whole numbers like 0.005, 12345, 89898 etc" Setting the format to longg (not long!) or shortg will solve...

7 years ago | 1

| accepted

Answered
part of file name
s = 'Hello_World_2020'; c = regexp(s,'_(.*)_','tokens'); c = c{1}{1}; c = 'World'

7 years ago | 1

Answered
Adding columns to tables
Try saving all tables to a cell array and then concatenating them after the loop. %Incrementing through all file names...

7 years ago | 0

| accepted

Answered
GUI, how to use previous loaded structure into next callback function?
" How is it possible to "attach" or "assign" this structure to the buttons and somehow be able to select fields and data from th...

7 years ago | 1

| accepted

Answered
Finding a specific rows?
This does not require a for-loop. In fact, the last line is the solution. The first few lines just creates an example matrix w...

7 years ago | 0

| accepted

Answered
Regular expressions, builing up a simple expression for a search
https://regex101.com/ I recommend that site when building regular expressions. ^(sw|wk|st).+(400_0\.inf|420_0\.inf)$ % ...

7 years ago | 1

| accepted

Answered
Save n*Number of Pie Charts Generated from a loop
Explanation of the problem The primary resource to go to with problems like these is the documentation which describes what the...

7 years ago | 1

| accepted

Question


Community profile not updating
Has anyone else noticed that their MathWorks community profiles haven't updated in the past ~15 hours (as of 7:30am EST, 7-18-19...

7 years ago | 1 answer | 1

1

answer

Answered
Split date variable of a table into 3 variables year month and day
"I have table with 3 variables (date, latitude, longitude) where the first variable is the date (dd/mm/yyyy)" % Create example ...

7 years ago | 0

| accepted

Answered
Locating points on the figure that correspond to a specific number on the colormap
In this functional example below, the colorbar value (cval) is set to 140.0 which is within the yellow-green spectrum of the col...

7 years ago | 0

| accepted

Answered
how to search and delete the nth ocurance of a text in a text file
The question is unclear whether the goal is to remove the 2nd line of text or to remove the line(s) with "John is happy". The b...

7 years ago | 1

Load more