답변 있음
Unable to perform assignment because the left and right sides have a different number of elements.
The output of g(....) is a 5x1 numerical array and DX(i) is a 1x1 numerical element. And you can not assign 5x1 numerical array ...

8일 전 | 0

| 수락됨

답변 있음
How can I get the value of a and b as a real number not as matrix
solve provides the option to generate multiple outputs - syms a b eqns = [2*a^2 + 4*a - 3 - 2*b^2 - 4*b + 3 == 0,a^3 - 4*a +...

8일 전 | 1

| 수락됨

답변 있음
How to find the x value of a function given by points?
Use logical indexing - Find Array Elements That Meet a Condition Also, as you are working with floating point numbers, it would...

8일 전 | 0

| 수락됨

답변 있음
Mean of a cell array with different cell sizes?
If the data in the cell array is compatible for concatenation, concatenate them and use mean for the specific dimension - a = ...

8일 전 | 1

| 수락됨

답변 있음
Conversion to cell from double is not possible.
You need to use curly brackets, {} %% Calculate delayed states for multiple delays x_d = cell(length(tau), 1); for k = 1:leng...

8일 전 | 0

| 수락됨

답변 있음
How can I merge two arrays in adjacent cells?.
I assume that the x and y data is stored in arrays x_vertices and y_vertices respectively. C = [x_vertices(:) y_vertices(:)] H...

8일 전 | 0

답변 있음
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...

8일 전 | 1

| 수락됨

답변 있음
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 =...

9일 전 | 1

| 수락됨

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

9일 전 | 0

답변 있음
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...

10일 전 | 0

| 수락됨

답변 있음
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...

10일 전 | 0

| 수락됨

답변 있음
What is the function to use to blacken a region?
patch fill area

11일 전 | 0

답변 있음
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...

11일 전 | 0

답변 있음
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...

12일 전 | 0

| 수락됨

답변 있음
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; ...

12일 전 | 0

답변 있음
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...

12일 전 | 0

| 수락됨

답변 있음
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 ...

12일 전 | 0

| 수락됨

답변 있음
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...

12일 전 | 0

| 수락됨

답변 있음
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...

12일 전 | 1

답변 있음
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...

13일 전 | 0

| 수락됨

답변 있음
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...

13일 전 | 1

| 수락됨

답변 있음
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...

13일 전 | 1

| 수락됨

답변 있음
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...

13일 전 | 0

답변 있음
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...

13일 전 | 0

| 수락됨

답변 있음
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...

14일 전 | 0

| 수락됨

답변 있음
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...

14일 전 | 0

답변 있음
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_...

14일 전 | 0

| 수락됨

답변 있음
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...

14일 전 | 0

답변 있음
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')

14일 전 | 1

답변 있음
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...

14일 전 | 1

| 수락됨