Answered
Can I make sound and soundsc not make a sound when playing a constant value?
> I was exploring what a ramp sounds like [using 1:10000] I think you're interpretting the audio data incorrectly but to your d...

6 years ago | 3

| accepted

Answered
How to change the order of sections in a .mlx file?
The ol' fashion copy-paste is the only way I know of. I wouldn't be eager to support the ability to drag and drop blocks of cod...

6 years ago | 2

| accepted

Answered
Global Variables and Functions
Assign B,C,p as outputs to bifurcation_host_pops(). Do not use global variables. And in the future, please copy-paste code a...

6 years ago | 0

Answered
How can i alternating signs in every line in a loop
To flip the sign of every second column of a matrix, starting with column 2, M(:,2:2:end) = -1*M(:,2:2:end); Note that this m...

6 years ago | 0

Answered
Grouped Bar Plot with NaN GAP
I agree with everyone's comments under you question; the bar plot is much clearer with the gap. Both the color and bar order,...

6 years ago | 0

| accepted

Answered
HOW TO PLOT THE INTERVAL OF t AND SIN
Here are the tools you'll need. These are basic Matlab 101 tools that you'll use a lot in Matlab. Define t using the colon op...

6 years ago | 0

Answered
How do I create a Matlab 5x5 matrix of numbers 1-100?
Use X=randi(100,1,5*5) to get random integers <=100 or x=rand(1,5*5)*100 if you want floating decimals. Then use sort() to ac...

6 years ago | 1

| accepted

Answered
How to count the number of points above and below a line
Let's say x stores all of the x-values of your coordinates. Compute the y-value on the line for each x-value. yLine = m.*x + ...

6 years ago | 0

| accepted

Answered
Generating a legend for one function that is associated with two variables
The call to sprintf contains one format specification and two values. That applies the formatSpec twice. demo: sprintf('Dem...

6 years ago | 0

Answered
Labeling axes in app design
Setting axis labels for uifigures (ie, in app designer) is the same process as setting axis labels in regular figures. The only...

6 years ago | 0

| accepted

Answered
App designer first application issue
Since the figure visibility cannot be set from Design View within AppDesigner, there's no way to start the app with an invisible...

6 years ago | 1

Answered
How do I change position of titles and subtitles of subplots?
Starting in r2020b you can set the TitleHorizontalAlignment property of the axes to specify the justification (left|right|center...

6 years ago | 1

| accepted

Answered
sym(1/3) bug?
Check your symbolic preferences. sympref If the FloatingPointOutput if true change it to false sympref('FloatingPointOutput'...

6 years ago | 3

| accepted

Answered
Why am I receiving the error message below?
After some brief digging, it seems like you're trying to use the stlread on the file exhchange rather than Matlab's stlread whic...

6 years ago | 0

| accepted

Answered
Declare a table where each column variable is an array of numbers
varNames = {'10:00','10:15','10:30','10:45','11:00',}; varTypes = {'double','double','double','double','double'}; sz = [5,5]...

6 years ago | 0

| accepted

Answered
How to restrict input
> I want to make sure you that my input is exactly a 5 digit number, and it cannot be alphabets Assuming "5 digits" means an in...

6 years ago | 0

| accepted

Answered
How do I find the rows in one table that have strings that match strings in another table?
Use this line to find the rows in NE.study_id that are in DS.study_id. ismember(NE.study_id, DS.study_id) If you want to ...

6 years ago | 0

| accepted

Answered
Finding correlation with inputs and output variables
It sounds like you want to plot the correlation between all pairs of variables. If you have the Econometrics Toolbox, you can ...

6 years ago | 0

| accepted

Answered
Creating equally spaced x axis on plot function
My guess set(gca,'xticklabel',x) should be set(gca,'xtick',x) If not, we need more info.

6 years ago | 0

| accepted

Answered
How to build random number every loop different?
It looks like you want random positive integers without repetition based on your use of randi. p = randperm(n,k) where n is the...

6 years ago | 0

Answered
How to make a 1x0 struct array
How to make a 1x0 struct array S = struct('a',cell(1,0),'b',cell(1,0), 'c', cell(1,0)) Addendum: why does this create a 1x0 ...

6 years ago | 2

| accepted

Answered
Create and save animated line from x and y values that correspond to time data
Here's a review of 3 animation techniques. If you get stuck, show us what you've got and describe the problem so we can focus ...

6 years ago | 0

Answered
Scatter Plot with multiple 'levels' on the Xaxis
I see two options. 1. Since the "test" and country labels are vertically stacked, you could set multiple rows of x-tick labels...

6 years ago | 0

Answered
App desiner GUI crashes when use scatter3
I've reproduced the problem using Matlab Online with the code below (commented-out to discourage people from trying it). Matlab...

6 years ago | 0

Answered
Disable pointer event in App Designer
To temporarily disable interaction across the entire app, use uiprogressdlg. It sounds like this is too restrictive for your n...

6 years ago | 0

| accepted

Answered
Zoom in on two images simultaneously displayed using imshowpair
> If I zoom into an area of imageA in the figure ouput, it zooms solely into this area, treating the two images as one image Th...

6 years ago | 2

| accepted

Answered
Slider which controls a bar plot
Here's a demo. The key is to set bh (the bar handle) and initialValues (the initial y-values of the bars) prior to setting the ...

6 years ago | 1

| accepted

Answered
Create a numeric variable DATE+HOUR
There's rarely a good reason to use datenum rather than datetime values. See Why are datetime arrays better than datenum? % Co...

6 years ago | 0

| accepted

Answered
How can I export the below table?
Use readtable to read in the data as table T. Use the conversion below. Write to csv using writetable T = array2table(reshape...

6 years ago | 0

Load more