Beantwortet
How to find the minimum of an array element, but in a interval?
Use logical indexing (Find Array Elements That Meet a Condition) to find the values in the given range and then use min.

mehr als 2 Jahre vor | 0

Beantwortet
How to remove the third to last element of an array?
number = [2; 3; 4; 5; 10; 0.45; 3; 99; 294; 1.96] %Number from last to delete k=3; %deletion number(end-k+1) = []

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Padding flag of the formatting operator in compose()
The number before the decimal specifies the length/field width of the output string. Padding will only be there if there is sp...

mehr als 2 Jahre vor | 3

Beantwortet
precision of string conversion using string()
From the documentation of string, subsection - Input arguments :- Input Type - Numeric array "Output format and precision equiv...

mehr als 2 Jahre vor | 2

Beantwortet
How to plot this function with 2 variables?
As you are using fplot, the expected input is a function handle. And the syntax to define a function handle is name_of_handle...

mehr als 2 Jahre vor | 0

Beantwortet
Readtable Returns "NaN" to the string type value if one column contains both number type and string type values
Each variable/column of a table is expected to be a homogenous array. The first value read in each column is a numeric value, an...

mehr als 2 Jahre vor | 1

Beantwortet
Complex or sparse input following 'like' is not supported
This particular syntax of generating normally distributed complex number was added in R2022a - https://in.mathworks.com/help/rel...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Why are the matrix numbers changing?
The numbers are not changing, the default display format is such. A = [1.08 -1 0; 2184.02 -2185.02 1;0 -1 1.81] %Change the ou...

mehr als 2 Jahre vor | 1

Beantwortet
random values and plot
In the code you have written, you are over-writing result in each iteration. Preallocate the variable and use the loop index to...

mehr als 2 Jahre vor | 0

Beantwortet
advice on how to type this formula
Define it as an anonymous function - x_1 = @(t) 1/2-1/pi*sin(4*pi*t) Fore more information, refer to these - https://in.m...

mehr als 2 Jahre vor | 0

Beantwortet
Why does my code produce a single direction vector and not a phase portrait of all the direction vectors
You need to use element-wise operations for defining Ddot and Pdot. Also, starting the values from -0.8, as for D == -1, the va...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
help me resolve error of row dimension of A is inconsistent with length of B
The inputs which constitute the linear inequality constrains, A*x <= b, A needs to have same number of rows as number of element...

mehr als 2 Jahre vor | 1

Beantwortet
How to find the maximum of a 2d function in specific interval?
Finding an extremum of a function in a bounded interval requires the use of numerical methods - syms x y P = 0; for i = 1:7 ...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
処理をして得られたデータを表にして、エクセルに出力する方法
From what I understood - jpegFiles = dir('*.jpg'); numfiles = 162; mydata = cell(1, numfiles); %Preallocate a table T = ...

mehr als 2 Jahre vor | 1

Beantwortet
Savingsame video several times with while loop
When checking for a file with an extension using exist(), you need to compare the output to 2. %% Example y = primes(50); wr...

mehr als 2 Jahre vor | 0

Beantwortet
Subs does not calculate result
You can use vpa() to get the answer as a variable precision symbolic number syms x y = x*log(x)-1; dy = diff(y); u = y/dy; ...

mehr als 2 Jahre vor | 1

Beantwortet
How to convert 2d implicit plot to 3d plot?
Here's an attempt. As the output from cylinder() is scaled for a unit height of the cylinder, thus it needs to be manually res...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Hello everyone. I have the following problem: my code cannot calculate the Type A uncertainty, which means the standard deviation.
Use sheetnames and readmatrix, as the xls functions are deprecated. Here, we take the advantage of matrix operations and the ...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
How to plot only the maximum values of the listed variables in a scatter plot?
Pswpdata = readtable('csv_file.csv') %Compute the min and max values by the groups of Frequency Variable T1 = groupsummary(P...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Ploting same y axis with two colors
HW = [rand(10,1) [1;4;5;7;2;24;8;9;18;11]]; %Mean value m = mean(HW(:,2)); %Comparison with mean idx1 = HW(:,2) >= m; i...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
Question to Further practice frame: Matlab Omramp Section 4.2 Vectors and Matrices > Create Evenly Spaced Vectors
"because when : is used no vector is computed." That is incorrect. The colon, : operator can be used to create vectors - y = ...

mehr als 2 Jahre vor | 0

Beantwortet
複数のボード線図に対して一つのレジェンドを付ける方法
Working with bode-plot figures is difficult. A (simple) approach is to use empty strings for the rest of the plots figure ho...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
Clean data and extraction
Use logical indexing for the first part - Find Array Elements That Meet a Condition, Access Data in Tables It's not clear to me...

mehr als 2 Jahre vor | 0

Beantwortet
working with numbers in the array names in for/ if loop
Dynamically naming variables is not a good coding practice. Read - TUTORIAL: Why Variables Should Not Be Named Dynamically (eva...

mehr als 2 Jahre vor | 1

Beantwortet
How to avoid using 'for' loop
Vectorize the function calculateValue() and use sum for calculateValue(u, v, R). However, this assumes that calculateValue() ...

mehr als 2 Jahre vor | 0

Beantwortet
problem with columnWidth..how solve it
The size of the data to be added to the table must be compatible with the dimensions of the table, which is what the error messa...

mehr als 2 Jahre vor | 0

Beantwortet
How to find mean of sin(t)/t with t [0, pi]?
Experiment with linspace and mean

mehr als 2 Jahre vor | 0

Beantwortet
Surface plot for two variable piecewise function
Utilize meshgrid to generate the points and evaluate the function using the points. Then employ surf to plot the piecewise func...

mehr als 2 Jahre vor | 0

Beantwortet
How to compare two arrays to find in which column a value from one array is greater than value of other array
A = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]; B = [1, 2, 3, 5, 8, 13, 21]; n = min(numel(A),numel(B)); %Comparison c...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
2D color map shows the image correct but the Y scale is flipped.
Using the high level version of imagesc changes the direction of y-axis to 'reverse'. Revert it back to normal - C = [0 2 4 6...

mehr als 2 Jahre vor | 0

| akzeptiert

Mehr laden