Beantwortet
How to use the logspace function to create a vector of frequencies in Hz and not rad/s
To get logarithmically spaced values between 0.087 and 20: logspace(log10(.087), log10(20)) To be clear, logspace doesn't take...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
FFT plot in frequency domain, error help
What is size(Data) and size(fs)? Your function doesn't error for me when I give it a scalar fs and a vector signal: load hand...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
subplot command does not work
I think you wanted commas and not colons: subplot(2,1,1) plot(rand(1,10),'r') title('red') subplot(2,1,2) plot(rand(1,10)...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
I am Trying to Plot 3 plots onto the same graph
You can do this with hold on, just drop the calls to figure. figure(1); Vm=5.07; % Calculated on Paper Ttide = 1; % you d...

mehr als 4 Jahre vor | 0

Beantwortet
Parse error at u: usage might be invalid MATLAB syntax.
If you want to multiply you need a * y=-0.0811*u^3... Also consider if you want to raise a vector to the power of 3, you proba...

mehr als 4 Jahre vor | 0

Beantwortet
Undefined function 'trend' for input arguments of type 'double'
If you're trying to use a function you got from elsewhere (e.g. downloaded from file exchange) you likely need to add the direct...

mehr als 4 Jahre vor | 0

Beantwortet
How do I get my plots and "disp" script to show up after its respective code script has concluded?
What you describe that you want is the behavior I'd expect. I ran your code and got exactly this, but I made a few changes: I a...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can I decrease the frame rate of a video?
Each iteration is going as fast as MATLAB can, you can slow it down with pause: videoReader = VideoReader('viplanedeparture.m...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Turn off auto stretch for 3D plot in app designer
When you have an axes that you made in App Designer, gca won't return your axes. Can you try your set(ax,props,get(ax,props)) ap...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How do I pull out from a table, the total mean of one item based on a particular condition (for several subjects), and then compute the difference in mean values?
You can do the first part with groupsummary Subject = [1 1 1 1 2 2 2 3 3 3 3]'; ItemA=[30 20 45 55 17 45 13 56 12 34 15]'; Co...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
display a shared legend for bar graph
There's an extraneous call to nexttile at the bottom, but after removing that I see what I'd call a shared legend....can you hel...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Cumulative sum with condition
I think what you're looking for is groupsummary (or grouptransform): x=[rand(10,1) randi(3,10,1)]; % this is the sum for group...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
plotting a line of best fit using a for loop
you're plotting your x values against a scalar (Bfit(a)). I'm a little unclear about what you're tring to do here (your polyfit ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
EEGLAB - Rename an event
In general, the excel-like find and replace can be done with strrep: bad = {'a' 'b"' 'c'} good = strrep(bad,'"','') But I'm...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Subscripted assignment dimension mismatch error
When you write: U(1:ki,1:ki)=pi; You're trying to put a 150x1 into a 150x150...Maybe what you intended was: U(1:ki,1:ki)=repm...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can I create a plot with random directions?
It looks to me like left and backwards are kindof the same thing...how about adding x to differentiate them? foward = 1; left ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Error during Greyscale tiff image conversion to RGB tiff image
You have a small typo: tagstrut.PlanarConfiguration you missed a c, you wanted tagstruct.PlanarConfiguration

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Overlay barchart with subplots
Currently your code creates an axes, turns hold on, but then subplot creates a new axes that deletes 'ax' You can add a hold on...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Re-creating NeuroExplorer's perievent spectrogram with MATLAB
The function you're looking for here is spectrogram, but getting it to produce an something like NeuroExplorer will take some pa...

mehr als 4 Jahre vor | 0

Beantwortet
How to play a note
The Note you made is a logical: you're asking where abs(t) is less than or equal to (a bunch of stuff) If you want to play th...

mehr als 4 Jahre vor | 0

Beantwortet
How can I obtain a certain value from the function 'find' from a 3x2 cell?
I think you're asking how to search for the index of a row in a matrix based on multiple columns (although you have a cell array...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
prevent shaded areas from changing the colors of the bars.
First, you'll want the patch behind the bars, so call patch first. You can keep the transparency on the patch, but if you don't...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Convert Cell Array into equation
I think you could use a combination of cellfun (to run on each cell) and eval (to evaluate the expression): a=readtable('matl...

mehr als 4 Jahre vor | 1

Beantwortet
Error: This statement is incomplete.
MATLAB won't distribute your j to all the locations in your print string, so you need a few more js. Have a look without the eva...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
programme matlab pour calculer et trace l'histogramme d'une image
im=imread('peppers.png'); % exemple d'image imshow(im) Si vous avez Image Processing Toolbox: figure imhist(im) Autrement...

mehr als 4 Jahre vor | 0

Beantwortet
A question about ismember function
Check out the documentation page here: https://www.mathworks.com/help/matlab/math/array-indexing.html (Indexing with Logical Val...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
My mesh grid is giving me a value not a matrix
The question is: how many points do you want in your grid? The : operator, by itself, takes increments of 1: 5:10 The min a...

mehr als 4 Jahre vor | 0

Beantwortet
Discrepancy between datenum and datetime?
This is one of the many reasons we have datetime, and why we recommend using datetime instead of datenum. If you can use datetim...

mehr als 4 Jahre vor | 0

Beantwortet
xlabel not working inside a function
You've named the function's parameters xlabel and ylabel. So within the function xlabel and ylabel are variables, not functions....

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Connect datapoints in Plot
Unfortunately, not all plotting functions accept table variables in MATLAB yet (scatter was one of the first of the 'traditional...

mehr als 4 Jahre vor | 0

| akzeptiert

Mehr laden