Answered
How do I generate executable code from imported data?
You need to add the @(list_of_independent_variables) before the formulae. Flushmatrix = readtable('Spülmatrix2.xlsx','PreserveV...

2 years ago | 1

| accepted

Answered
A compact way to reduce, or remove, the fractional part (separated by a decimal point) of numbers in a table
Take the floor of the data. LastName = {'Paris';'London'}; Feature1 = [71.4589;69.1432]; Feature2 = [176.3458;163.9082]; T =...

2 years ago | 1

| accepted

Answered
change negative data to zero in one table in matlab
Find Array Elements That Meet your Condition and assign them to be 0.

2 years ago | 0

Answered
Extracting a vlue from a matrix using a neighboring value as a reference
If you want the value corresponding to all occurences of the maximum value in row 1 - %Input data arr = [1 2 4 10 3 10...

2 years ago | 0

| accepted

Answered
Function output variable is unrecognized
eig is a built-in function in MATLAB. And there are many other toolbox functions, with the same name. It's not a good idea to n...

2 years ago | 0

| accepted

Answered
What is the function to use to blacken a region?
patch fill area

2 years ago | 0

Answered
Variable A must be of size [6 6]. It is currently of size [7 7]. Check where the variable is assigned a value.
It seems you have made an off-by-one error - https://en.wikipedia.org/wiki/Off-by-one_error#Fencepost_error Try this - h = 25...

2 years ago | 0

Answered
how to represent when I have a process in progress?
"hi, how to display an hourglass? or similarity?" Check out waitbar. Options from FEX include - progressbar, statusbar, text p...

2 years ago | 0

| accepted

Answered
How to index two vectors together
One way is to use arrayfun() but that is just a for loop in disguise. %Bigger data vec_A = 10.*(1:1e5)+1; vec_B = vec_A+3; ...

2 years ago | 0

| accepted

Answered
Using integral to define a function
Remove the E from the integral() call, as it is not required. Refer to the documentation of integral to know more about the syn...

2 years ago | 0

| accepted

Answered
Plot a 2D graph with two x axis
Draw a line on the second axes and set its color to none. That shows up the xticks and the xticklabels. There seems to be some ...

2 years ago | 0

| accepted

Answered
Extracting data from a .fig file
There are multiple objects in the figure. You need to choose the object(s) for which you want to get the data - open('Comparai...

2 years ago | 0

| accepted

Answered
Sorting pairs into seperate matrices based on whether they are ascending or descending
Firstly, do not use built-in functions as variables (or script) names, like you have done here - diff=diff(pairs(i,:)); Sec...

2 years ago | 1

Answered
plot single vector and plot matrix
To get the same result, transpose the array and then plot. Refer to the documentation of plot to understand the behaviour of pl...

2 years ago | 0

| accepted

Answered
how to do a scatter plot with second x axes
I have modified the code related to the plotting part. The ytick labels look bold because there are two sets of them, one on to...

2 years ago | 1

| accepted

Answered
Stacked line plot legend color change
As you want to get the legend for individual chart(s) from a stackedplot of multiple tables/timetables, turn the "CollapseLegend...

2 years ago | 1

| accepted

Answered
error statement is not inside anny function
Any functions defined in a script must be at the end of the script. Also, the function monteCarloSimulation_withProjection is d...

2 years ago | 0

Answered
hold on/off for loglog axes
You can use colororder paired with RGB Triplets - x = logspace(-1,2); y1 = 10.^x; y2 = 1./10.^x; y3 = 1.^x; figure log...

2 years ago | 0

| accepted

Answered
Why is this loop faster than a vectorised version? Could the vectorised version be made faster than the loop?
Ideally, timeit should be used over tic-toc to get a more accurate idea of run times of the codes. tic-toc is generally used for...

2 years ago | 0

| accepted

Answered
Not enough input arguments ode45
I am not sure how the different symbolic variables and expressions come into play here for solving the ODE. Nonetheless, Any fu...

2 years ago | 0

Answered
Find the amount of graph intersections
You can utilize this FEX Submission - https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?s_tid=ta_fx_...

2 years ago | 0

| accepted

Answered
Drawing line chart in EXCEL from Matlab and bridging the missing values(NaN)
You can interpolate the missing data via fillmissing and then plot - data = readmatrix('filename.extension'); %Linear inter...

2 years ago | 0

Answered
Check if the multiple 1x2 arrays contained within a 4x2 array exist within a larger 10x2 array
a1 = [1, 5, 4, 3; 3, 4, 7, 1] b1 = [5,4,1,3,7,1,9,5,8,3; 4,7,3,1,5,6,3,9,5,3] [out, idx] = ismember(a1.', b1.', 'rows')

2 years ago | 1

Answered
How to create a complex transfer function?
You need to provide the multiplication operator. And close the parenthesis properly. Computers don't understand that two param...

2 years ago | 1

| accepted

Answered
piecewise function and function handles
You need to define multiple conditions separately/individually i.e - This (0<= wave_angle <= pi-E_2rad) should be - (wav...

2 years ago | 0

| accepted

Answered
Multiple Lines in a Stacked Plot
If you are working with R2018b or a later version, check out stackedplot %Random data n = 10; t = (1:n).'; a = zeros(n,1); ...

2 years ago | 1

| accepted

Answered
How would I plot this and then achieve minimum and maximum.
Look into Array vs Matrix Operations max, min - for global extremum islocalmax, islocalmin - for local extremum

2 years ago | 0

Answered
'tabulate' function
tabulate is a part of the Statistics and Machine Learning Toolbox. To access the function, you need to download and install the ...

2 years ago | 1

| accepted

Answered
How to concatenate the data in each iteration in the same variable?
Firstly, you don't need to use find(), logical indexing is going to be faster. As for storing the data, You can preallocate a c...

2 years ago | 0

Answered
如何使此程序正常运行?
As the error states, The function interp1() expects the length of the first input to be equal to the number of rows in the secon...

2 years ago | 1

| accepted

Load more