Answered
Arrary indices must be positive integers or logical values
One of your indices is <= 0. You haven't shared enough information for us to say exactly what the problem is. See Ch 5 of MATL...

5 years ago | 0

Answered
Surface fit approximation for x,y and z data
Since your data appears to already be gridded, I'd suggest using interp3.

5 years ago | 0

Answered
ode45 too many input arguments
The first input to your odefun needs to be t. Also note that the output of your odefun needs to be a column vector. Final comm...

5 years ago | 0

| accepted

Answered
How do you plot a graph of the sine function?
I suggest going through MATLAB Onramp. Ch 9 covers plotting specifically, but you might benefit from completing the entire cours...

5 years ago | 0

Answered
how to plot discrete stock price in matlab
You can learn about plotting in Ch 9 of MATLAB Onramp.

5 years ago | 0

| accepted

Answered
How to expand a small matrix to a larger matrix
I think you need two for loops. One for the rows, one for the columns. If you replace your current numbering with just integers...

5 years ago | 0

| accepted

Answered
dlmwrite does not append to file
The error I see is due to the dollar sign in your precision. Remove that, and it prints the numbers in the desired format. The ...

5 years ago | 0

| accepted

Answered
How do I get a function in a for loop so it applies it to an entire table?
To follow up, the easiest way to find yearly max is to use groupsummary with the appropriate settings. load matlabworkspace28.0...

5 years ago | 0

| accepted

Answered
Convert table of Daily Stock data into Monthly data
Look into groupsummary. G = groupsummary(T,groupvars,groupbins,method) Use the date info as your groupvar. Use the appropriat...

5 years ago | 0

| accepted

Answered
Take individual daily sum of value
Look into groupummary. G = groupsummary(T,groupvars,groupbins,method,datavars) There is a 'daily' option under groupbins. Us...

5 years ago | 0

| accepted

Answered
Principle component analysis coefficients and standardization
I find this video a good explanation of PCA. In short, principal components describe the directions of max variance of the dat...

5 years ago | 0

Answered
how to connect matlab with raspi
https://www.mathworks.com/hardware-support/raspberry-pi-matlab.html

5 years ago | 0

Answered
A matrix/grid from two vectors
meshgrid creates the matrices of x and y coordinates you wlil need to plot a mesh/surface plot. Lookin at the examples on the m...

5 years ago | 0

| accepted

Answered
How to create an interval for an if statement?
Try ismember if ismember(q,5:5:200)

5 years ago | 0

| accepted

Answered
Symbolic function expected 3 inputs and received 2
T is a defined using p(x,y,t). This causes T to also be a function with the same 3 inputs. However, when you call T in your cal...

5 years ago | 0

| accepted

Answered
Im trying to draw a graph but i cant figure out how to join up the plots
You have different equations for each section of the line. Why do you think this can be plotted without using hold? For loops ...

5 years ago | 1

| accepted

Answered
Can not Read CSV file with readtable function
The error I encountered is because the extendion of your csv file was changed xls. Change it back to csv, and readtable should w...

5 years ago | 1

| accepted

Answered
Getting the accelerations (or 2nd time derivative) from ODE solver
The ode solvers in MATLAB solve the odes. The solution of a dv/dt equation is velocity. If you want the solver to return acceler...

5 years ago | 1

| accepted

Answered
How to display only selected xticks?
The xticks function should be all you need. X = linspace(0,4*pi,40); Y = sin(X); figure stairs(Y) xticks([7 12 18 33])

5 years ago | 1

| accepted

Answered
Creating a new table from values in a table that meet a condition
Logical indexing. See Ch 12 of MATLAB Onramp. If you are actually working with a table and not a matrix, you may find this page...

5 years ago | 0

| accepted

Answered
Rearrange data plot3 and combine data points
For #1, this is because you are rotating your view 180 degrees around the Y axis. Try view(0,0) instead.

5 years ago | 0

| accepted

Answered
Add time to a datetime array
I would use the datetime values you already have in your table T. load T_matlab.mat ind = timeofday(T.DateTime) == duration(14...

5 years ago | 0

| accepted

Answered
Why isn't animatedline showing a line plot?
I think the animatedline commands should be outside the for loop. In fact, everything except for the addpoints related code shou...

5 years ago | 1

| accepted

Answered
Error in Matlab code
The error message is correct. Your path points to a folder onscale1. However, the folder appears to be just onscale.

5 years ago | 1

| accepted

Answered
Get rid of peaks with small prominence
Look into findpeaks. There is a MinPeakProminence input setting you can use to ignore peaks below your defined threshold. You c...

5 years ago | 0

Answered
How to plot a horizontal line on a distance-time plot
Use yline.

5 years ago | 0

Answered
I'm getting >> Reference to non-existent field 'speak'. error. Please help.
Your code is fine. Make sure you create an instance of the class, then use that when calling your method. See here. c=dog; c.n...

5 years ago | 0

| accepted

Answered
How to put Months along the x-axis?
I would suggest making your dates datetimes, and then just plotting against that data. x=datetime(1950,1,1):calmonths(1):dateti...

5 years ago | 3

Answered
how to read the data byte by byte in .raw file?
See the documentation for fread (Read data from binary file). There are some examples on that page that should help you get star...

5 years ago | 0

Answered
MATLAB Associate Certification information
You can find the information and links to answer your questions in this answer: https://www.mathworks.com/matlabcentral/answers...

5 years ago | 0

Load more