Answered
Ergebnis enthält "oder"
syms y(x) f = y(x)^2 * (diff(y(x), x))^2; eqn = functionalDerivative(f,y) == 0; %Get the equation mentioned in the question...

2 years ago | 1

Answered
Table row retrieval with dependent on column values
Rec_id =[1; 1; 2; 2; 2; 3; 3; 4; 4]; % for clarification: the values here go up to 80 in the original table Rec_type= {'A';'B';...

2 years ago | 1

| accepted

Answered
dendrogram関数の配色を任意のものにする
dendrogram is basically a group of lines. Thus, you will have to change the color of each lines accordingly - load fisheriris ...

2 years ago | 0

| accepted

Answered
how to remove all the value zero in column 2?
%Example A = num2cell([0;rand(10,1);0;0;rand(5,1);0;0;0;1]); B = num2cell(char(randi([30 50], numel(A), 1))); C = [B A] %Fin...

2 years ago | 0

Answered
solve by the matrix method
Use mldivide, \

2 years ago | 0

Answered
Side by side subplots with one split into 3
Use tiledlayout - tiledlayout(3, 2) %Span a tile across 3 rows and 1 column nexttile([3 1]) fplot(@sin) nexttile scat...

2 years ago | 1

Answered
How to run 3 script in sequence?
First of all, Never use built-in functions as variable or scripts names. You should modify the names of the scripts; for e.g. ...

2 years ago | 1

| accepted

Answered
How to define function include others functions in matlab
X = @(u) 1-u; Y = @(v) 1-v; R = @(u,v) sqrt(X(u).^2+Y(v).^2); %Integrate R w.r.t u from 0 to 1 %and w.r.t v from 1 to 2 ...

2 years ago | 1

| accepted

Answered
グラフのy軸の目盛りラベルにて、整数部の表示桁数を指定する方法について
The ticklabels are stored as the mantissa and the exponent is stored as the property of the corresponding axis (see below). So,...

2 years ago | 1

| accepted

Answered
error in using eig built-in function
The symbolic function eig does not support the syntax that you are trying to use. The numeric function eig does. So, you can...

2 years ago | 0

Answered
cell array for loop assignment
An approach without loops - A = {rand(10,2),rand(10,2),rand(10,2),rand(10,2)} B = horzcat(A{:}) C = mat2cell(B, [5 5], [2 2 ...

2 years ago | 1

Answered
How to combind a 1d Matrix with a 3d Matrix to form a 4d Matrix?
A = rand(10000,28,28); B = rand(10000,1); A = permute(A, [2 3 4 1]); B = permute(B, [4 3 2 1]); size(A) size(B) C = A.*B...

2 years ago | 0

| accepted

Answered
how to use makeUniqueStrings
Utilize the functionality of strings - vec1 = 1:10; vec2 = 4:10; [vec1 "A"+vec2]

2 years ago | 0

| accepted

Answered
fill the entry of a vector with a given distance
M = 10; A = [1;zeros(M-1,1)]; d = 3; A(d+1:d+1:end-(d+1))=1

2 years ago | 1

Answered
How to save .mat files on the disk after each iteration?
The values will be over-written in each iteration, so you don't need to clear them. for k = 1:number_of_iterations %get im...

2 years ago | 0

| accepted

Answered
sym에서 double로 변환할 수 없다는 오류가 뜨는데 어떻게 해결해야 할까요?
You need to pass the function to be analysed as a function handle - % vvvvv golden(@trig,1,3,10^-8,10^-8) function g...

2 years ago | 0

| accepted

Answered
Merge tables based on a string key
Use innerjoin

2 years ago | 0

| accepted

Answered
How to find same values in an array and their index
arr = load('array.mat') mat = arr.yintercept val = 1e-6; %As you are dealing with floating point numbers, use tolerance to ...

2 years ago | 0

Answered
How to convert 4D double matrix into 2D arrays
Use squeeze - in = rand(1,1,101,14); size(in) out = squeeze(in); size(out)

2 years ago | 1

| accepted

Answered
Loop inside a loop isn't working
There are 2001 elements in x, not 2000. (Imo) It's better to use numel() to get the number of elements, rather than manually usi...

2 years ago | 0

| accepted

Answered
how create cell 1:10 vertical
c = (1:10).'; c = num2cell(c)

2 years ago | 1

| accepted

Answered
Help with Pre-allocating function values
Dynamically growing arrays is detrimental to the performance of the code. You should Preallocate arrays according to the final o...

2 years ago | 1

Answered
come posso eliminare le colonne di una matrice?
From what I understand - %Random data as input %Here columns 6, 7 and 8 are same as columns 2, 3, and 5 respectively in = [1...

2 years ago | 0

| accepted

Answered
Set aspect ratio of stacked plot
You can change the (inner) position of the stacked plot - https://in.mathworks.com/help/matlab/ref/matlab.graphics.chart.stacked...

2 years ago | 0

| accepted

Answered
Trying to get a equation in terms of symbolic values but cant
As you are adding Symbolic variables, pre-allocate P as a symbolic array - % vvv P = sym([0; 0; 0;]) syms V3 theta2 theta3...

2 years ago | 0

Answered
Create function that varies between 1 and zero if input is 1 or 2
The output variable should be the same - y1 = delt(1) y2 = delt(2) y3 = delt(-69) function y = delt(x) if x == 2 ...

2 years ago | 0

| accepted

Answered
plotting same values as individual points on x-axis
x=[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5]; y=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]; vec = 1:numel(y); scatter(vec,y) xticks(vec) xtickl...

2 years ago | 0

| accepted

Answered
How to add Mean and Median to a boxplot?
sample=readmatrix('Data.csv'); x=sample(1:end,1); xString=string(x); dataSample=sample(:,2:end); %Calculate mean m = mean...

2 years ago | 2

| accepted

Answered
Need to delete the previous points in a plot while plotting continously
Change colors and other properties as you like/prefer. x = [1,2,3,4,5]; y = [3,4,5,6,7]; plot(x, y, 'r') hold on h = anim...

2 years ago | 0

| accepted

Answered
MATLABで得られたデータをExcelの各シートに名前を付けて保存したい!
x_data = [1, 2, 3, 4, 5]; y_data = [6, 7, 8, 9, 10]; z_data = [11, 12, 13, 14, 15]; str = ["x" "y" "z"] + "data"; arr = ta...

2 years ago | 0

| accepted

Load more