Answered
How to fix: Index Exceeds Matrix Dimensions.
I placed your code inside an infinite while loop and ran it for 15 minutes and no errors occurred. Perhaps there is some additio...

5 years ago | 0

Answered
Everything being the same, then why does matrix C give different values in the two codes?
Because they are not the same? Your output should be [size(A, 1)*size(B, 1), size(A, 2)*size(B, 2)] See the More About > Kroen...

5 years ago | 0

Answered
How to solve a double complex ode using ode45 in MATLAB
You can solve a symbolic ODE with initial/boundary conditions using dsolve S = dsolve(eqn,cond)

5 years ago | 0

Answered
Hi, I am stuck on simscape onramp course task 5 of 'feeback control (practice)'. I've tried don't exactly what the solution says and it won't work. The error is
In the meantime, consider trying what was suggested in this post: Do tasks 1-5 as instructed. All that is correct. Before runni...

5 years ago | 1

Answered
In table, replace NaN with Text (from NaN to "ABCD")
NaN suggests you have numeric data in your column (Not A Number). You will have to convert your numeric values to strings if you...

5 years ago | 0

Answered
datenum on array of values - specifying the format
You do not need to enter a format if your data is already a datetime. The 'FormatIn' flag should only be used if your date is a ...

5 years ago | 0

Answered
Translate a music sheet into MATLAB code
In music, notes are just sine waves at a specific frequency played for a specific amount of time. Any quiet time can be achieved...

5 years ago | 0

| accepted

Answered
Adding boundary condition to dsolve argument
I'm no expert here, so take this for what it is worth. You mention needing to set a condition. Does the Solve Differential Equ...

5 years ago | 1

| accepted

Answered
one common y label for the subplots
If you use tiledlayout instead of subplot, you can add shared title and axis labels. See this example. t = tiledlayout(2,2,'Til...

5 years ago | 2

| accepted

Answered
Index exceeds the number of array elements (1).
The error means you are trying to index a vector/array element that does not exist in your variable. Specifically, your error me...

5 years ago | 1

Answered
run part of a function file
Use breakpoints to pause execution at a specific line in your function. See here: https://www.mathworks.com/help/matlab/matlab_...

5 years ago | 0

Answered
How would I write this code?
What is month? You are using it as a variable. However, if you have not defined it as a variable, then MATLAB is trying to cal...

5 years ago | 1

Answered
Undefined function or variable 'cell2str'.
That is not a function created by MathWorks, but you can get it here from File Exchange.

5 years ago | 0

Answered
i want to draw a triangle with vertices on 3 axis, how to do it? and also how to draw a incircle in it?
You could just use plot3. Just remember to close the loop. plot3([1,0,0,1], [0,1,0,0], [0,0,1,0]) If you want it filled in, yo...

5 years ago | 1

Answered
Vector not updating in while loop
It is replacing the current value of pipe with the new value. It sounds like you instead want to create a vector. See Ch 13 of M...

5 years ago | 0

Answered
There is an apparent error in line 4, and this code only ran once
The issue I see is that you are using b in line 4 to calculate c2, but do not define b until line 9. Perhaps you just need to re...

5 years ago | 0

Answered
Stacking more than 200K files (same #columns)
Consider using a datastore. You can see an example in our Importing Multiple Data Files video from our Practical Data Science wi...

5 years ago | 0

Answered
For loop broken ?
rho is calculated using the current value of h(n), which your code has defined as zero. Therefore, rho is always going to have t...

5 years ago | 0

Answered
Why, when I calculate the skewness of a series with constants, do I not get NaN?
I suspect this has to do with how floating point numbers are stored in a computer. 76 can be stored exactly as is, but 22.8000 i...

5 years ago | 0

| accepted

Answered
Compare two tables's rownames (A and B), if the rownames of B are in A then add a column in A with the columns in B
I would first try using the Join Tables live task. This will interactively let you align two tables using key variables. Once yo...

5 years ago | 0

Answered
Eventhough i used syntax for plotting xlabel, ylabel , title but its not visible in the graph
It works fine for me clear clc syms x y f(x)=x.^2; % modified so code runs here I=[0 10]; % modified so code runs here a=...

5 years ago | 1

Answered
Warning: Attempt to write an unsupported data type to an ASCII file. I am trying to save a matrix to an ascii file but it keep throwing this error
I'm not able to reproduce your error, but try following this example. I would code this as save M.txt M -ascii % or save('M.t...

5 years ago | 0

| accepted

Answered
Column with constant value
Simple assignment. See how to access data in a table, as well as ch 4 of MATLAB Onramp (creating vectors).

5 years ago | 0

Answered
Error loading m file form online Matlab drive to Matlab online
What browser are you using? Be sure your browser meets the browser requirements.

5 years ago | 0

| accepted

Answered
2021b Tiled Layout keeps its title
Please report this here.

5 years ago | 0

Answered
help with summing the values of a table and storing in a matrix
Use groupsummary. It should be something like this avgHigh = groupsummary(hightemp,[year,month],'mean')

5 years ago | 0

Answered
How to include txt file on standalone app by app designer.
I think you should be able to use the application compiler and include your text file in the 'Files your app needs in order to r...

5 years ago | 2

| accepted

Answered
My graph won't plot
The issue is that you are performing a matrix division in your function, which results in a single value. It looks like you want...

5 years ago | 0

Answered
How do I plot single points only when using apps?
I would set up the slider to go from 1 to the number of points in the waveform, and then use the slider to select the index to p...

5 years ago | 0

Answered
Date Time to elapsed Time
Read in the times as datetimes. Then subtract the first time from all times. T.Timestamp = T.Timestamp-T.Timestamp(1); % Set f...

5 years ago | 1

| accepted

Load more