Answered
FIR Filter 10th Order with for loop
I'm not sure why you'd see the error message "[U]nable to perform assignment because the indices on th[e] left side are not comp...

4 years ago | 0

| accepted

Answered
Loop which Checks Values of Matrix
M = [2.7 , 1.9 , 0.75 , 0.16 , 0.35]; c = 1; for ii = 1:numel(M) if M(ii) > c M(ii) = % new element from formu...

4 years ago | 1

Answered
How to trim a table field to be a certain character length?
Your example taxa_table: Taxa = {'Navicula'; 'Navicula-Nitzschia'; 'Pennate Diatoms Stellate Colonies'}; taxa_table = table(Ta...

4 years ago | 0

| accepted

Answered
How do I create an app that I can import Excel data into?
"does the file I want to import always have to be in [a particular folder]" No. uigetfile lets the user select a file in any f...

4 years ago | 0

Answered
When I do shading interp for pcolor on App Designer the graph becomes blank.
% Unrecognized property 'FaceColor' for class 'matlab.ui.control.UIAxes'. This error happens because FaceColor is not a uiaxes ...

4 years ago | 0

| accepted

Answered
How can I make my picture fit the papersize?
Try this: filename = "picToConv"; outPutfilename = "yourPDF"; [X,~] = imread(filename); imageH = size(X,1); imageW = size(X...

4 years ago | 0

| accepted

Answered
How to export a 3D surface (gyroid) into an STL file
https://www.mathworks.com/matlabcentral/fileexchange/20922-stlwrite-write-ascii-or-binary-stl-files

4 years ago | 1

Answered
I'm trying to display the results vertically but the results are shuffled
%% NEWTON METHOD %% syms f(x) x syms g(x) x f(x)=@ (x) x^3-x-1; g(x)=@ (x) (3*x^2)-1; err=0.001; n=9; x=1; %x(1)=1; %ini...

4 years ago | 1

Answered
Produce simple iradon geometry
Maybe use the optional input argument output_size when you call iradon: data = [0,1,2,3,4,3,2,1,0]; R1 = radon(data); figure(...

4 years ago | 0

Answered
Cell Array Indexing of HEX values
a = {'0F 04 0A 0E 1E 2F', '3E 2A 1F 03 05 0A'}; C = squeeze(split(a,' ')) C{1,4}

4 years ago | 0

| accepted

Answered
How to plot contour?
x = [-4.2195; -5.7195; -7.2195; -8.7195; -2.7195; -4.2195; -5.7195; -7.2195; -8.7195; -1.2195; -2.7195; -4.2195; -5....

4 years ago | 0

Answered
Is it my equation wrong? Cause I get a weird graph for this equation.
If the current is given by that function of time i(t), and you should plot the current vs time, then there is no need to do c*di...

4 years ago | 1

| accepted

Answered
Contour comparison with same colorbar limits.
Use clim (a.k.a. caxis): % Make x-y mesh grid x = [-4.2195; -5.7195; -7.2195; -8.7195; -2.7195; -4.2195; -5.7195; -7.21...

4 years ago | 0

Answered
scatter plot with patches
One difference in the grey patches between the previous plot (here) and the one you're making now, is that before, the patches w...

4 years ago | 1

| accepted

Answered
I want to assign multiple arrays of data simultaneously to different variable
D = [1 2 3 4 5 6 7 8 9 10]; [p q r] = deal(D(1:2), D(2:5), D(6:10))

4 years ago | 0

| accepted

Answered
Build a Relation Between Matrix Elements
If that's really what you want to do, notice that if you sum these 8 equations: A1_1 = A(1) + A(2) + A(3) + A(4); A1_2 = A(1) ...

4 years ago | 1

| accepted

Answered
GUI Button Does Not Change Colour
Insert drawnow commands immediately after changing the Color/Text, in order to see the changes right away: function StartButton...

4 years ago | 0

| accepted

Answered
How can i print fixed text on UIAxes?
You can set the text's Units to 'normalized' so that the text Position is relative to the axes Position, rather than relative to...

4 years ago | 1

| accepted

Answered
How can I draw a graph using a button?
You need to tell the plot function to plot into your axes: plot(app.UIAxes,X,Y) If your axes is called something besides app.U...

4 years ago | 0

| accepted

Answered
I need to take a large array and separate the data into columns.
Since the first half of the array A is one category and the second half is another category, you can reshape. Then writematrix t...

4 years ago | 0

| accepted

Answered
Importing a table as (:,1) timedate (:,2) categorical
opts.VariableOptions is an array. You meant to set a property (DatetimeFormat) of the first element of the array but instead acc...

4 years ago | 0

| accepted

Answered
Error using any Dimension argument must be a positive integer scalar within indexing range. Error in Untitled4 (line 37) while ~any ( N,'all')
The any(__,'all') syntax in while ~any(N,'all') is valid in MATLAB version R2018b and later. If you are running an earlier v...

4 years ago | 0

Answered
Creating Graphs from Data in a .csv Files
Subscripting a table with ( ) gives you another table. To get the data out of a table, subscript with { } my_csv=readtable('Win...

4 years ago | 1

Answered
concatenate string with array
A= [23.5567, 5.34567, 23.1]; B= [-13.5357, 6.254, 2101.2]; C= [4,8,15]; One way: sprintfc('%d-sample1-sample2-(%0.2f,%0.2f)'...

4 years ago | 0

| accepted

Answered
get values from each column and create graphical
A = ... [4.37 43700 12866.8 14880.8 8.74 87400;... 1.4098 14098 22850 13683.4 2.8196 28196;... 3.0706 30706 32876 13051.8 6.1...

4 years ago | 0

| accepted

Answered
How to upsample (increase) 2d points with interpolation
load points figure; plot(pts(:,1),pts(:,2),'LineWidth',6) hold on n = size(pts,1); BC = interp1(1:n,pts,linspace(1,n,1009...

4 years ago | 0

| accepted

Answered
How to rearrange time array in a matrix of years and days?
% some x x = (1:365*43).'; % reshape x to have years as rows and days as columns x_matrix = reshape(x,365,[]).'

4 years ago | 0

| accepted

Answered
how can I show the first 50 maximum values in a graph with several peaks?
[pkmax,indmax]=findpeaks(y,x,'NPeaks',50);

4 years ago | 0

Answered
How to save output in array
Like this? num = 5; for k = 1:num a(k) = k^2; end disp(a)

4 years ago | 0

| accepted

Answered
Getting numbers of entries in uitable
column_name is a vector, so strcmp(column_name,'Corn') is a vector (of class logical), so when you do: if match_corn == 1 that...

4 years ago | 0

| accepted

Load more