Réponse apportée
In one loop, sort table and save each matrix in different text files, How?
data = readtable('sampleU.xlsx') [uZ,~,jj] = unique(data.Z); for ii = 1:numel(uZ) % pick a file name for the sub-table (n...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Last graph is plotted with no data points(figure 3) dont know why
Use ./ instead of / Signal_Attenuation = (signal_strength_-30) ./ d

plus de 3 ans il y a | 0

Réponse apportée
How can I use interp1 to interpolate the last row of a matrix?
Here's my guess at what you mean: A = [1,2,3;4,5,6;7,8,9;10,11,12] N = size(A,1); A(N+1,:) = interp1(1:N,A,N+1,'linear','extr...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
How to print values on different row in App designer Table
Try it like this: % add a row to app.UITable.Data: app.UITable.Data = [app.UITable.Data; {predicted pred1}]; % add another ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
working with a vector
% a column vector: x = [1;4;5;7;10] % one way: diff(x) % another way: x(2:end)-x(1:end-1)

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Receiving error when trying to obtain multiple inputs
It's a good idea to share the complete error message you received, including the line number and the text of the line the error ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
App Designer dispaly values in Text area and Guage
% textarea app.BText.Value = num2str(B); % assuming BText is the name of your textarea % gauge app.AGauge.Value = A; Ref...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
i am not getting what is the problem with it
function good = find_good_hotels(hotels,ratings,cutoff) if ratings>=cutoff Ridx=find(ratings) good=hotels(Ridx) else...

plus de 3 ans il y a | 0

Réponse apportée
I'm trying to create a 57x1 matrix out of the con_data 57x4 matrix/variable, and then plot that matrix from the userinput. But avg_energy is an unrecognised function/variable
Seems like con_data (rather than avg_energy) would be an input to choose_plot, since choose_plot calculates avg_energy from con_...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Error using plot: Unrecognized property LineWidth for class Line
Use 'LineWidth' instead of 'LineWidth ' with a space on the end. plot(th,Ias, 'k− ',th,Ibs, 'b−− ',th,Ics, 'r: ','LineWidth ',2...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Pythagorean theorem with matrix
function C = pita(AB) A = AB(:,1); B = AB(:,2); C = sqrt(A.^2+B.^2); % (no transpose) end

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to use a script as a callback or ButtonDownFcn in uicontrol?
% Add Proceed Button To Figure pButton = uicontrol(CIW,'Style','pushbutton','Units','pixels',... 'FontName...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Error using matlab.graphics.axis.Axes/set
First, thank you for including data and runnable code. Second, it appears to run fine here (see below). Try updating your peak...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Converting a 3D matrix to several 2D matrices
max_iteration=5; a=zeros(10,48); b=zeros(10,48); s = zeros(10,48,max_iteration); for k=1:max_iteration % presumably a a...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Nested loop for matrix
clc clear all; % ED = readmatrix("Data filteration1.xlsx"); ki = 0.0042; %%current temp coeff Ns=72; %%72cells i...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Live Editor: Brace indexing changes Table to Struct
Your table is A, but all of the code we can see here involves A.all. Shouldn't you be doing, for instance: number=sum(A{i,5:end...

plus de 3 ans il y a | 0

Réponse apportée
Removing Variables From a Cell Array
"for the array Y it wont remove the final string" That's because changing the loop iterator (in this case the variable ii) does...

plus de 3 ans il y a | 0

Réponse apportée
I want to change the name of the three box chart to other three names
xticklabels({'A' 'B' 'C'}) % whatever labels you want

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Functions to encode a function
Not sure exactly what you mean, but [h g f e d c b a] encodes the function f(x) (for use in polyval, for instance). a=3; b=0; c...

plus de 3 ans il y a | 0

Réponse apportée
Define the values in each row of a 100x150 matrix as row numbers
One way: repmat((1:100).',1,150) Another way: (1:100).'+zeros(1,150)

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
I have a menu in which a user selects a continent and enters in a year that they want to look at a set of data values for. How would I go about extracting the values in matrix
% user selects continent and year: [continent, con_data] = choose_continent(); year = choose_year_2(); % then store the row...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
I want the GUI to input a result from another m file in a static text box after clicking a push button.
As I understand the situation, you have an m-file that contains the code you posted, and you want to run that m-file from your G...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Use "function name" (add, ...) to call this function but it is added
I notice that the function x4_ps looks like this: function x4 = x4_ps(~,p,s) % ^ indicating the first input ...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Error using discretize: Bin edges must be a vector that is real, numeric or logical, and monotonically increasing.
load newdata load split_points_noID Not every row of split_points_noID is monotonically increasing, because there are some tra...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
ERROR // Array indices must be positive integers or local values
The error happens because sometimes the random value returned from rand is small enough that rand1 or rand2 is 0. Try replacing...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to delete a the min value of each group in a table?
% a simple table Data = table([1; 1; 1; 2; 2; 2],[1; 2; 3; 4; 3; 2],'VariableNames',{'Number' 'valdif'}) % findgroups, return ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
why it not a number
syms T; Fx=3*T.^2-12*T+16; Fy=2-9*T+6*T.^2-T.^3; dx=diff(Fx, T); dy=diff(Fy, T); dx=dx.^2; dy=dy.^2; l=dx+dy; l=sqrt(l);...

plus de 3 ans il y a | 1

Réponse apportée
Finding rows of minimum valueS by group
Some data like your date3 and TimeToMaturity columns (just using 1, 2, 3, 4 for date here): date = reshape(repmat(1:4,5,1),[],1...

plus de 3 ans il y a | 0

Réponse apportée
How to compute number of bit change among consecutive binary numbers?
% A = 110; 101; 011; 111; 100; 001; 010 A = dec2bin([6; 5; 3; 7; 4; 1; 2],3) N = size(A,1); C = zeros(N); for ii = 1:N ...

plus de 3 ans il y a | 0

Réponse apportée
How do you use App designer to read files from a folder and then present those files in the gui for the user to select one or multiple from?
Here's a function (select_files) you can refer to when working on your app (or use this as-is). It uses a uitable and a uicontr...

plus de 3 ans il y a | 0

Charger plus