Respondida
Average of evey nth row of a large matrix
To average every nth row: a=rand(100,10); n = 10; mean(a(1:n:height(a),:),2) But I think you want the average of the first...

alrededor de 5 años hace | 0

| aceptada

Respondida
index exceeds the number of array elements?
The line of code: dFForward=(F(2:n)-F(1:n-1))/h; looks for F ranging from 2:n. n is 27, length(F) is 26. You've requested the 27...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to see the plot of the desired matrix through the figure statement?
Tables actually make this very easy, because you can refer to the variable names. But you can also index as you did in your exam...

alrededor de 5 años hace | 0

| aceptada

Respondida
Performing multiple Operating system commands in a loop
When you use ! it will treat everything after as text, it won't evaluate RR(k).in Assuming RR(k).in is a string or char: sy...

alrededor de 5 años hace | 0

| aceptada

Respondida
how to access elements of a vector inside a cell array
The length part should return the entire contents of the cell, so your code looks fine to me. Inside the loop you'd refer to the...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to save plot graphs as binary image with 64x64x1 dimensions in matlab
You could use getframe to get a matrix representing the image x = linspace(-2*pi,2*pi); y1 = i*j*sin(x); y2 = i*j*cos(x); pl...

alrededor de 5 años hace | 1

Respondida
Sorting out raw index from raw data
A trick to these kinds of problems is to combine find and diff, diff is good at marking the transitions between states and find ...

alrededor de 5 años hace | 0

| aceptada

Respondida
Moving data within a struct: shifting from one cell to another cell with multiple repetitions.
I think I follow your question, a few pro tips: If you can make your question less about your example and more about the abstra...

alrededor de 5 años hace | 0

Respondida
How can I timely recieve the simulation results via email
There are some instructions here for sending email if you have an SMTP server that supports POP or IMAP: https://www.mathworks....

alrededor de 5 años hace | 0

| aceptada

Respondida
How to add minor ticks to a time series
You can control the minor tick spacing with the MinorTickValues property with the XAxis property on the Axes... % some fake dat...

alrededor de 5 años hace | 1

| aceptada

Respondida
Add multiple legends to graph
You can't (easily) make multiple legends, but you can make a 'fake' legend by including some objects in your chart that have NaN...

alrededor de 5 años hace | 0

| aceptada

Respondida
What's an efficient way to pick a specific slice in a high dimensional array
That's a scary looking array! Not sure how slick it is, but if you're looking to turn those 6 colons into a number 6, you can...

alrededor de 5 años hace | 1

| aceptada

Respondida
error in my modified auto-contrast function
Your bug: c starts at 0, matlab indexing is one based, you're referring to c(0) but that's not allowed. Consider: this is a ...

alrededor de 5 años hace | 0

Respondida
How extract the value in certain position for a loop in matlab?
I think what you're asking is for a vector with the second digit of the values in y? Here's a fixed version of your code: ID =...

alrededor de 5 años hace | 0

| aceptada

Respondida
Contact details for Matlab Training
https://www.mathworks.com/services/training/contact-training.html

alrededor de 5 años hace | 1

Respondida
How to create more bubbles/balls in the figure legend?
There's no option to make bubblelegend with more than 3 bubbles. You can sort of fake it by making a separate bubblechart in a s...

alrededor de 5 años hace | 1

| aceptada

Respondida
Ignoring certain matrix entries with surf plot
A few solutions come to mind that all take advantage of interpolation, depending on how 'ignore' is interpreted (I used NaN but ...

alrededor de 5 años hace | 1

| aceptada

Respondida
How to add a title for any subplot in addition to a subplot title?
You can do this sort of thing with tiledlayout instead of subplot, taking advantage of nested layouts: t = tiledlayout(3,1); %...

alrededor de 5 años hace | 1

| aceptada

Respondida
How can I extract quickly the numbers separated my commas and parenthesis from a txt file?
It's not the most elegant solution, but as you said 'quickly' :) a=readmatrix('test.txt',"Whitespace",'(','Delimiter',{')' ','}...

alrededor de 5 años hace | 0

| aceptada

Respondida
uitable with latex or greek letters
Starting in R2022a, the Interpreter property is supported in uistyle. Previous answer (Aug 9, 2021) I believe html tags are ...

alrededor de 5 años hace | 1

| aceptada

Respondida
Can anyone help me with this error?
giuliayearlyDELTA2.Year is a char array, so giuliayearlyDELTA2.Year(1) is '0', and you're calling datetime on that value. Som...

alrededor de 5 años hace | 0

| aceptada

Respondida
How do I use the figure window tools to select a curve from multiple superimposed curves in a plot?
You can use the Plot Browser for this. Click View/Plot Browser and you'll see a list of objects in your axes. When you click on ...

alrededor de 5 años hace | 2

| aceptada

Respondida
Resample produces unexpected vector length
I think the error is in your arithmetic (?) 1228446 / 61423 1228460 / 61423

alrededor de 5 años hace | 0

| aceptada

Respondida
Adjust the vertical and horizontal alignment of the label of xline function
This would be much easier to diagnose if you put your code in the question instead of a picture, but I belive you used a number ...

alrededor de 5 años hace | 1

| aceptada

Respondida
How to draw exponential function in matlab
It seems like you listed a couple of functions, were you looking to plot them separately? Can plot the functions using fplot...

alrededor de 5 años hace | 0

Respondida
Struggling with fft of a signal.
As signal was defined with signal=readtable(... I bet signal is a table, I think you want to pass in one of the listed types to ...

alrededor de 5 años hace | 0

| aceptada

Respondida
Print vectorized graphic of patches without edges
Using exportgraphics might do a little better. exportgraphics(f,'mypdf2.pdf','ContentType','Vector') Looks better to me, altho...

alrededor de 5 años hace | 0

Respondida
Problem in using datetime
The H in your format is referring to a 24-hour clock hour, as in 14 to represent 2pm, but that doesn't make sense as you're also...

alrededor de 5 años hace | 1

| aceptada

Respondida
Error updating Scatter: Data lengths must match - but they do...
@Megan Jurczak: I bet this is SizeData, you're setting it initially to: ones(sum(gnss.tow == slide(1)),1)*25 So it matches th...

alrededor de 5 años hace | 1

| aceptada

Respondida
Figure in mlapp appears in front
Do you mean in App Designer? If you right click on the image, there's an option "Reorder" and from there you can select "Send To...

alrededor de 5 años hace | 1

Cargar más