Respondida
Data set for papaya fruit
https://www.google.com/search?q=papaya+dataset

más de 4 años hace | 0

Respondida
Change xaxis from numbers to dates
x = 1:8760; y = x+5; figure() % plot(x,y) dt = datetime(2019,1,1,x-1,0,0); dt([1 end]) plot(dt,y) set(gca(),'XTick',datet...

más de 4 años hace | 1

| aceptada

Respondida
4x1 Matrix of text from dynamic variables
Try this: Text = textscan(FID, '%s'); MatrixT1 = Text{1}([2 7 12 17])

más de 4 años hace | 0

Respondida
Invalid Subscript for Y, the table variable must be numeric array
First and Second are tables. Use curly braces {} rather than parentheses () to get the data out of a table: A = table([1;2;3;4;...

más de 4 años hace | 5

| aceptada

Respondida
Generating color map for a 3d grid
X = 1:10; Y = 1:10; Z = 1:10; Values = rand(10,10,10); % 16-color jet colormap cmap = jet(16); NC = size(cmap,1); % s...

más de 4 años hace | 0

| aceptada

Respondida
I want to display a bar plot.
Something like this would work, for the bars: data = randi([3 6],120,1); colors = [ ... 61 99 89; ... 66 145 128; .....

más de 4 años hace | 1

| aceptada

Respondida
How can I place one row value from a column vector onto every 3rd column on a row vector, with the empty values to display zero?
A = [1;2;3;4;5;6;7;8]; If you want B to end with [ ... 0 0 8 0 0 ] B = zeros(1,3*numel(A)); B(1:3:end) = A; disp(B) Or: B ...

más de 4 años hace | 0

| aceptada

Respondida
add a moving image over a plotted trajectory
Something like this? x = 0:pi/100:2*pi; y = sin(x); figure(); plot(x, y); hold on xlim([0 2*pi]); ylim([-1 1]); I = ...

más de 4 años hace | 1

Respondida
Plot all polyshapes in cell array
You could use cellfun: cellfun(@(x)plot(x(:,1),x(:,2)),D); That's more concise, I guess, but it also may be less clear than th...

más de 4 años hace | 0

| aceptada

Respondida
I am connecting a photointerrupter to an arduino that generates digital output (HIGH and LOW) but I don't know how display that on a text box on GUI.
edit2_Callback is the function that is executed when the editable text object handles.edit2 is interacted with by the user, so t...

más de 4 años hace | 1

| aceptada

Respondida
Why does it give an error?
B, f, and V9 need to be passed to meshgrid as three separate arguments, separated by commas: B=[3.0000 4.0000 5.0000 6...

más de 4 años hace | 0

Respondida
Plot gain vs frequency (GUI)
If you have the Control System Toolbox or the System Identification Toolbox, you can try using bodeplot instead of bode, which w...

más de 4 años hace | 1

| aceptada

Respondida
Number of rows for given y
M = randi(10,9,2) % random 9-by-2 matrix of integers between 1 and 10 y = 6; % y value to find in the second column of M nnz...

más de 4 años hace | 1

| aceptada

Respondida
How to assign the color intervals while using the jet color chart?
If, by "modify the interval between" colors, you mean "use different" colors, then yes. You can use Any Colour(s) You Like. Perh...

más de 4 años hace | 0

| aceptada

Respondida
How to find the position of a given vector A in a matrix M when the size of vector A is smaller than the columns of that matrix?
Here's one way, assuming you want to match A or its reverse and that the elements have to be contiguous: M = [46 58 50 46 41 4...

más de 4 años hace | 0

| aceptada

Respondida
how to Initialize the starting point for region growth.
"only the point (x,y) is at “1” and the rest of the image is at “0”. knowing that the x coordinate indicates the column number a...

más de 4 años hace | 0

| aceptada

Respondida
Need help with generating an echo for an Audio signal
Avoid cutting off the echo, i.e., use y instead of y(1:end-delay) %Definding the echo delay = 10000 Z = zeros(delay,1); % Yn...

más de 4 años hace | 0

| aceptada

Respondida
how to mirror plot "around zero" on x axis
t = 0:0.1:50; y = sin(2*pi*t/10)+0.005*t.*randn(1,numel(t)); % some random signal plot(t,y) % original signal hold on plot(-...

más de 4 años hace | 1

| aceptada

Respondida
Why do I get more error bars than I defined?
error is a 1-by-284 vector (going by the .fig file) whose elements are all 0 except at indices 40, 80, 120, 160, 200, 240, and 2...

más de 4 años hace | 0

Respondida
the capacitor_value is returning Nan
In the switch block, R is set to a double already, so it is not correct to do str2double after that. In fact, doing so makes R i...

más de 4 años hace | 0

| aceptada

Respondida
Calculate daily values from cumulative values
You can simplify your calculations of state_cases_d and state_deaths_d by using the diff function: load ('cumul_variables.mat')...

más de 4 años hace | 0

| aceptada

Respondida
How to store values in the following if loop?
The cause of the error is attempting to set A1(0). Indexing in MATLAB starts with 1, not 0, so initialize counter to be 1. (Als...

más de 4 años hace | 1

| aceptada

Respondida
Using a for loop to iterate over the elements of the initial matrix and keep just the ones in the diagonal
I think you are understanding the loops correctly. I think the misunderstanding is due to the fact that Adiag still exists when ...

más de 4 años hace | 0

| aceptada

Respondida
Trouble graphing. My function is not appearing.
Use element-wise division (./). With matrix division (/) y is a scalar, and plotting a scalar y vs a vector x creates one line ...

más de 4 años hace | 1

Respondida
I want to change the backgroung color of my plots.
Is something like this what you mean? colors = [1 0 0; 0 0 1; 1 1 0]; thresholds = [1 2]; figure() subplot(2,1,1) x = 0:0...

más de 4 años hace | 1

| aceptada

Respondida
Show tick marks/grid/axes on top of plot
Here's a start, maybe. You can find other PolarAxes properties you might need to tweak, and fine-tune them similarly. polarscat...

más de 4 años hace | 1

| aceptada

Respondida
how to code i included in A
Maybe you can use ismember. (Here I'm using ii to avoid ambiguity with the imaginary unit 1i, a.k.a., i.) ii = 3; A = [1 2 3 4...

más de 4 años hace | 0

| aceptada

Respondida
y axis value representation on figure
yyaxis left plot(0:1000:50000) yyaxis right plot(400000000:-10000000:0) set(get(gca(),'YAxis'),'Exponent',0,'TickLabelForm...

más de 4 años hace | 1

| aceptada

Respondida
How to receive a function in MATLAB app DESIGNER given by user in edit field?
Something like this would work for functions of one variable, which is always called 'x' % user inputs: str = 'x^2+2^x+3'; % f...

más de 4 años hace | 0

| aceptada

Respondida
Calling function without specifying name
app.allimages{row,coll}.ImageClickedFcn

más de 4 años hace | 0

| aceptada

Cargar más