Respondida
How to calculate the average between each two adjacent members(rows or columns)?
Try this: >> a= [1 2 3 4 5]; b = (a(1:end-1) + a(2:end))/2 b = 1.5000 2.5000 3.5000 4.5000

más de 4 años hace | 0

| aceptada

Respondida
How to vary the value of a edit text in matlab gui?
The first argument passed to a timer's TimerFcn, which you have called hObject in your u function, is the timer object. The argu...

más de 4 años hace | 0

| aceptada

Respondida
surf plot using meshgrid?
As z is an array, the following two statements if z<100 and elseif z>=100 & z<200 will only be true if every element within ...

más de 4 años hace | 0

| aceptada

Respondida
center of matrix value
centerValue = A((N*N+1)/2); A((N*N+1)/2) = newValue;

más de 4 años hace | 1

Respondida
plotting graphs in matlab
You can solve for the intercepts using the equation for y1 and update the axes limits accordingly: clear clc x=0:10; y1=-2*x...

más de 4 años hace | 0

| aceptada

Respondida
Programmatically generating radio buttons based on pop-up menu selection
Would something like this work for you? f = figure; data.p1 = uipanel(f, 'Position', [0 0.5 1 0.5]); data.p2 = uipanel(f, 'Po...

más de 4 años hace | 0

| aceptada

Respondida
How to read only vowels of a string
>> regexprep('How to read only vowels of a string?', '[^aeiouAEIOU]', '') ans = 'ooeaooeoai' >> char(regexp('How to...

más de 4 años hace | 1

| aceptada

Respondida
Problem with creating a new .txt file.
You'll need to get the character vector contained within the 1x1 cell array sm(3) by instead using sm{3}, then horizontally conc...

más de 4 años hace | 0

Respondida
Error using matlab.ui.control.EditField/set.Value 'Value' must be a character vector or a string scalar.
value as obtained from event.Value is a character vector, so adding 3 to it does not do what you may think it does: >> '4'+3 ...

más de 4 años hace | 2

| aceptada

Respondida
string split in cell array
Use fileparts and cellfun. Code courtesy of @dpb: >> a = {'c\datat\pic\res\000-774'; '\c\datat\pic\res\152-7987'}; [a1,a2]=cel...

más de 4 años hace | 1

| aceptada

Respondida
Variable isn't showing in the input command (A little square appears instead)
Try either for i=1:NEOx VNEOx(i) = input(['Introduzca la Masa Molar del elemento ' num2str(i) ': ']); end or for i=1:NE...

más de 4 años hace | 0

Respondida
using numerical values in symbolic expresion
Even though you assign a new value to y, the function f is still dependent on two symbolic variables. You can use subs to replac...

más de 4 años hace | 0

| aceptada

Respondida
How to filter data with in specific time range of each day ?
How about T = readtable('March2020_irradiance.txt'); filteredT = T(T.TimeID > duration(5,0,0) & T.TimeID < duration(19,0,0),:)...

más de 4 años hace | 0

Respondida
Find position of the first place a value is reapeted.
How about i = find(diff(a)==0,1);

más de 4 años hace | 0

Respondida
Change line from Guide to Appdesigner
app.DropDown.Items = cellstr(num2str((1:65)'));

más de 4 años hace | 0

| aceptada

Respondida
Two planes cutting each other
One option is to set x, y, and z values to NaN if they do not fall in the appropriate region: [x1, z1] = meshgrid(linspace(0,1,...

más de 4 años hace | 0

| aceptada

Respondida
assign operations for Drop down menu options
You can access the selected option using the Value property of dd: switch dd.Value case 'Alpha' %calculation for ...

más de 4 años hace | 1

| aceptada

Respondida
How can i compute Amino Acid composition for my protein sequence data?
allAA = sort('ARNDCQEGHILKMFPSTWYV'); seq = 'AEYDDSLIDEEEDDEDLDEFKPIVQYDNFQDEENIGIYKELEDLIEKNE'; counts = histc(seq, allAA); ...

más de 4 años hace | 0

| aceptada

Respondida
How to select specific matrix rows trough specifik given numbers
If A is your N x 6 matrix and B is your N x 4 matrix, B(A(:,4)==15,:)

más de 4 años hace | 1

Respondida
App Designer How to "StartUp" within the App?
(1) Two possibilities to reset your app to its default state: https://www.mathworks.com/matlabcentral/answers/489003-reset-or-c...

más de 4 años hace | 0

| aceptada

Respondida
count ranks in specific row/column
Is something like this what you mean? % sample PxQxN array: P = 5; Q = 6; N = 10; A = num2cell(randi([1 10], P, Q, N)); % ...

más de 4 años hace | 0

| aceptada

Respondida
How do I add PValues to corrplot
If you call corrplot(table, 'testR', 'on') then significant correlation coefficients will be shown in red. You can specify the...

más de 4 años hace | 1

| aceptada

Respondida
Help: delete(axis) doesn't delete the axis object but only removes the plot in App-Designer
For some reason, evnt.Axes in your toolbar button callback is not equal to the corresponding axes that you store within app.myax...

más de 4 años hace | 1

| aceptada

Respondida
Function to calculate seconds between times in hh:mm:ss string format
What if you can get by without your requirement for simplicity? function ts = timediff(tref, t) tref = dot([3600 60 1], st...

más de 4 años hace | 0

| aceptada

Respondida
Solving a symbolic equation in one or more variables
Your equation is >> eqn eqn = [ b == 1, b == 90] which has no solution. You could specify that b should be a 1x2 vect...

más de 4 años hace | 0

Respondida
row circular shift in matrix
M(row,:) = [M(row,end) M(row,1:end-1)]; % shift to the right M(row,:) = [M(row,2:end) M(row,1)]; % shift to the left (edit) To...

más de 4 años hace | 0

| aceptada

Respondida
Creating a moving line to depict progress
Simple and crude but possibly relevant to what you are hoping for? The actual progress bar is a set of axes. A patch shows how ...

más de 4 años hace | 1

| aceptada

Respondida
Undefined Function or Variable
length(o) and length(n) will both be 1, as o and n are scalars, so your code never enters your for loops. You should instead use...

más de 4 años hace | 1

| aceptada

Respondida
I am getting the following error "Index exceeds the number of array elements (70)." , please help me out!
Although the values within x2 range from 0.031 to 0.1, they are stored at indices ranging from 1 to 70: >> x2(1) ans = ...

más de 4 años hace | 0

| aceptada

Respondida
How can I set an axis outside the polar figure like this photo?
You could create Cartesian axes which overlie the polar axes and are invisible except for the y axis, whose ticks are set to mat...

más de 4 años hace | 0

| aceptada

Cargar más