Pregunta


How can uicontrol be used to make an editable dropdown (eg combobox) control?
I'd like to use the uicontrol of matlab and its arguments rather than the uidropdown. But I want the uidropdown functionality o...

más de 4 años hace | 2 respuestas | 0

2

respuestas

Respondida
How to reverse the order of words in string
There's undoubetly better solutions, but: strtrim(strrep(cell2mat([flipud(split('Hello. I. am. Here.'))']),'.','. '))

más de 4 años hace | 1

| aceptada

Respondida
How to change interval unit of x axis
Here's one way You can do shape downsampling - reshape then sum the lines. I made some data by digitizing yoour plot. It's att...

más de 4 años hace | 0

| aceptada

Respondida
Loading multiple images, taking mean of them and subtracting background
change the .png for whatever file extension you are using. Are your image greyscale? If not, it might not make sense to backg...

más de 4 años hace | 0

Respondida
Alternating up and down in my script to find path through 'maze'
Try this algorithm: Goal:to assign a label to each connected track of 1's on a background of 0's. Procedure: Scan image left t...

más de 4 años hace | 0

| aceptada

Respondida
How to filter data by date?
My suggestion is to convert all your times to an new variable of time in matlab's datenum format. A datenum is the number of da...

más de 4 años hace | 0

Respondida
Plotting a smooth curve
First, I added a header to the xlsx file so readtable can be used properly. myData = readtable('Data_help.xlsx'); figure() pl...

más de 4 años hace | 1

| aceptada

Respondida
Errors with my code
You redefined y to zero it out and at a different dimension than t. Also some typos in the annotation. T1=[0:0.001:2]; Y1=(-1...

más de 4 años hace | 0

Respondida
Fourrier transform on image
Here's an example - the grid of features is space every 20 meters, the frequency found at 0.05/m corresponds to the frequency of...

más de 4 años hace | 0

Respondida
Axes after 2D fft
Some great online references are in the matlab code. Whenever I post links at the top of an answer, the answer gets flagged as ...

más de 4 años hace | 2

Respondida
flip an array with the use of vectors
a=[1 7 5 9 3 2 4 1]; a(3:6) = fliplr(a(3:6));

más de 4 años hace | 0

Respondida
readmatrix with numbers and text from .csv file
The problem is your last line has 5 columns. This seems to do what you're asking, and hopefully will be enough to get you start...

más de 4 años hace | 0

| aceptada

Respondida
How do I get only the HR out of this .csv
If you post the file, or at least the first 20 lines or so, it would be easier to say which command is best to use. Generally, ...

más de 4 años hace | 0

Respondida
How to access folders within a loop
Try this (in absence of the Airport.xlsx files I can't completely test it here) - edit the obsdir back to your folder name where...

más de 4 años hace | 0

Respondida
I have a problem with plotting a summation equation, Help me!
Hi. Editing - I had a (3-i) instead of (3+i) in the denominator - it's fixed now: k = 6; f = @(x)sum(sqrt((2*k-3)./((3 + [0:...

más de 4 años hace | 1

| aceptada

Respondida
How can i put this below lines of code in a for loop?
Here's how to do it for png, because that is all I have. Change extension to tif. % Edit this to be your toplevel directory m...

más de 4 años hace | 1

| aceptada

Respondida
How can I store data from an if loop into a 1D vector
This function returns the indices where the peaks for ECG values in time-segments defined by a user-specified threshold functi...

más de 4 años hace | 0

Respondida
Using Read Table with a predefined Table size
Processing difficult text files - here the text file is space delimited with one or more spaces, but has a variable number of co...

más de 4 años hace | 0

| aceptada

Respondida
Hi, check this question
Two Charges % Two 1 nC point positive charges are located at (-1, 0, 0) m and (1, 0, 0) m respectively. % Write a MATLAB scri...

más de 4 años hace | 1

Respondida
How can I display multiple Images and plot the centroid ?
I played with the first part to make some more plot options (I had to do the poor man's distances because I can't afford the sta...

más de 4 años hace | 0

Respondida
How to subset a table in a function based on input arguments
Can just use an anonymous function: clc close all clear all getVarsetTable = @(t,userPrefix) t(:,contains(t.Properties.Var...

más de 4 años hace | 0

| aceptada

Respondida
How to change the way it is being plotted?
Possible solution (journal paper values just eyeballed not digitized) JSRdB=40:5:60; MSESilva = [0.9592 1.1141 1.6038 ...

más de 4 años hace | 1

| aceptada

Respondida
Find cell position of a timeseries array
Assuming your data are in vector arrays that are, say, doubles, and packed as not cell arrays: test.Time = 0:0.1:50; test.Time...

más de 4 años hace | 2

| aceptada

Respondida
I NEED TO SHOW THE COLUMN STACKED DATA OF MY LANDSET IMAGE
This unpacks the capture, but i'm not sure what you want next: [img,cmap] = imread('Capture.png'); imshow(img) imgData1 = s...

más de 4 años hace | 1

| aceptada

Respondida
Construct a vector from another, but add 2 values every 10 iteration
Try this: npts = 811; A = linspace(0,1,npts); numAdded = sum(mod(1:npts,10) == 0); B = zeros(1,numAdded+npts); k = 0; for ...

más de 4 años hace | 0

| aceptada

Respondida
creating a 1D vector
Here's one of many possible solutions (edited 2020/01/11 for off-by-one error in indexing): clc close all clear all ECG = ...

más de 4 años hace | 0

Respondida
creating a 1D vector
Here's a solution that has a step by step process. clc close all clear all %% Step 0 % load the data ECG = dlmread('ECG...

más de 4 años hace | 0

Respondida
Minimizing a function with one variable
Is this what you're looking for? p = pi; w = 9*pi/56; c = 5; rmin = -40; rmax = 40; % inline function fun = @(x)(0.5*p*...

más de 4 años hace | 0

| aceptada

Respondida
How to tell if a random 3x3 Matrix is invertible
Back to your question, I have to produce a random 3x3 matrix A that is invertible and display it. One way could be to start with...

más de 4 años hace | 0

| aceptada

Respondida
maximum of the radiation pattern in a direction
Solution, I hope! % for a general (theta0,phi0) express the surface in spherical coordinates % [Azimuth,Elevation,R] = cart2sp...

más de 4 años hace | 0

| aceptada

Cargar más