Answered
please how can I compute extreme rainfall with reference to a period of time from the 98 percentile
If your timeseries is stored as a vector named "rainfall", calculate the 98th percentile by y = prctile(rainfall, 98); To de...

7 years ago | 0

Answered
How can i regexp this sample text?
In this solution, the file is first read into matlab as a char array. Then I segregate the "CHANNEL" variable and convert it in...

7 years ago | 0

Answered
How to write matlab code for The 2-D correlation (correlation coefficient) between the current frame and a previous frame for 300 frames?
Assuming the frames are represented by a series of equally sized matricies, you can just loop through your frames, starting with...

7 years ago | 0

Answered
how to store a char array to a single column array and 3 letter values ?
This sultion produces some fake data to work with and then separates it according to your description. Tested. Works. % Cre...

7 years ago | 0

| accepted

Answered
uigetfile with default filter
Just change the order of the filters. Example: uigetfile({'*.fig'; '*.m'}) % 'fig' appears on top uigetfile({'*.m'; '*.f...

7 years ago | 0

Answered
Frequency spectrum - Reading certain y-values
How can I best "read" these and store them in a separate vector / matrix? file = 'C:\Users\name\Documents\MATLAB\5M_60°_4_5MHz_...

7 years ago | 1

| accepted

Answered
How to fix following error?
"Error: The length of the segments cannot be greater than the length of the input signal." When you're using miliseconds, your ...

7 years ago | 0

Answered
plotting data into an image with plot function
I'm guessing that you want to plot the coordinates listed in C on top of the image. I = imread('test.png'); imshow(I) axis o...

7 years ago | 0

Answered
Obtaining data from a text file
I've attached the sample text file to run this demo. In the 3rd line of code, a regular expression is used to search for the ro...

7 years ago | 1

| accepted

Answered
Print UIAxes to file
UIAxes still cannot be printed from app designer. A workaround is to move the content to an external figure which can be printe...

7 years ago | 0

Answered
Maximize my GUI window
If your GUI was created in GUIDE(), open your gui in guide: guide('mygui') Select tools > GUI Options... In the "Resize be...

7 years ago | 2

| accepted

Answered
Element multiplication and subtraction
This line below avoids error but that doesn't mean it does what it is intended to do. %(D/(1-D))*(1 /( (2*Ron*D/(R*((1-D) ^...

7 years ago | 0

| accepted

Answered
My gui will not open when I click run (but it did before)
Your GUI is initializing with the "Visible' parameter set to 'off'. To fix this, Open your gui in GUIDE. guide('calc_projec...

7 years ago | 1

| accepted

Answered
sort cell array in descending order based on 2nd column
The [65 x 2] cell array in your mat file is named "A1". [~, idx] = sort([A1{:,2}], 'descend'); A1_descendingOrder = A1(idx,:)...

7 years ago | 0

| accepted

Answered
code for color matlab
1) Use software that has a color dropper so you can select the colored object and get its RGB values. Here's a simple, free, we...

7 years ago | 0

| accepted

Answered
Logistic regression: Interpretation of stats
Since the 'model' parameter isn't specified in your call to mnrfit(), I'm assuming your working with nominal responses which is ...

7 years ago | 0

Answered
how to plot 120 images on same figure by using loops
You're creating a new figure upon each iteration. I haven't sifted through all of your code and I'm not sure how 120 images are...

7 years ago | 0

Answered
shortest path between 2 set of coordinates
(continuing from comments under the question) set_1 = [7.5,6.5;7.5,7.5;4.5,8.5;7.5,6.5;8.5,6.5;9.5,6.5;9.5,5.5;8.5,1.5;7.5,4.5;...

7 years ago | 1

| accepted

Answered
Hi, I have a large txt file of point cloud data. From this I have produced a 3D scatterplot of x,y,z. I need to produce a 2D cross section, through the centreline of points to get a x,z cross section. Any help please?
(continuing from the comments under the question) Choose the y coordinate where you'd like to slice your data, and then choose...

7 years ago | 0

Answered
setting up 2nd y axis scale
Judging from the image, you mean you'd like to fix the left axis. yyaxis left set(gca, 'YTick', [0:300:3000])

7 years ago | 0

Answered
Apply changes to ALL UIAxes in AppDesigner?
Option 1: optimize one of your axes and then copy it. If you haven't created the 19 axes in your app yet, create the first one,...

7 years ago | 0

Answered
How do i calculate velocity and acceleration from positional data
Here are suggestions as requested Use your (x,y,z) coordinates to calculate distance: pdist() Use your time stamps to calcuat...

7 years ago | 0

Answered
How to solve loop equation with given data
(continuing from the comments under the question to that the question is answered). The more responsible way to initialize the ...

7 years ago | 0

Answered
Index exceeds number of array elements (1)
We can't run your code because we don't have values of n, dt, A, and so on. But based on the information you provided, (T_night...

7 years ago | 0

| accepted

Answered
How can I save a figure within app designer?
How can I save a figure within app designer? Matlab r2016a or later copyUIAxes(handle,parent) from the file exchange copies th...

7 years ago | 11

Answered
Can I save UIAxes plot in anyway?
Update: Try using copyUIAxes() from the file exchange. [original post below] There's no way to directly save the 'figure' pr...

7 years ago | 4

| accepted

Answered
For loop question with matrix
"I want to sum column 2 values until column 1 value is 1." With your input matrix "A", 's' is the sum of column 2 for each gro...

7 years ago | 0

Answered
Calling a integer vector and cell array string in fprintf in order
FTstr = strsplit(sprintf('%.f ', FT)); txt = [FTstr(1:end-1);U]; fprintf('The equivalent temperatures to %3.0f deg F are:...

7 years ago | 0

| accepted

Answered
How to stop App Designer resizing UIAxes?
Ideally you would save the inner position of the axis, do the plotting, and then restore the inner axis position. But the 'Inne...

7 years ago | 5

| accepted

Answered
Saving variables as .mat or xls files without overwriting them with every iteration of a loop
(continued from comments section above). Here's an implementation of Adam's suggestion. % Create an anonymous function that ...

7 years ago | 0

| accepted

Load more