Beantwortet
continuous signal to discrete
You didn't really describe what you tried and where you got stuck...how about a simplified example that has all of the building ...

mehr als 4 Jahre vor | 0

Beantwortet
How do you set every other row as well as every other column to zero?
To remove every other column, set it to empty. You can do "every other" generally using A:2:B where A is the first value and B i...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Plot Mean over Box Charts using Positional and Color Grouping Variables
Boxchart makes this really difficult! The location of the categories is well defined, but the offset (while easy to calculate) i...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How can I use multiple colormaps for contour plots ?
You can totally do this with three axes, I'm guessing the only bit you needed was to target the specific axes when setting the c...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to signal divide into windows of lengths [1024] .
How about assembling up a matrix marking the indices of x you want. Of course you'll have to do something so that it's divisible...

mehr als 4 Jahre vor | 0

Beantwortet
How to plot results from each iteration of a for loop SEPARATELY
You can do this in separate windows using the figure function: for i = 1:3 figure plot(rand(1,10)) end In separat...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How can I create a matrix with matrix elements of different datatypes?
You can use a cell array to mix datatypes: n=5; mat = cell(n,2); for i = 1:n mat{i,1} = i; mat{i,2} = -i:i; end m...

mehr als 4 Jahre vor | 0

Beantwortet
Excel sheet extraction data
When you call readtable (or readmatrix or readcell) you can specify a range. I think the range has to be contiguous (i.e. you co...

mehr als 4 Jahre vor | 1

Beantwortet
Questions about data types and tables
In your loop, X(:,i) is the contents of the table variable, and you're using it with dot indicating it as the name of the variab...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
pdist2 output is larger than expected
pdist2 is providing all the pairwise distances. It compares row 1 of A with row 1 of B (Z(1,1)), then row 1 of A with row 2 of B...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
plot values MATLAB table with conditions
The mistake here is thinking about this as an if statement, instead you want to use what people often call logical indexing. In ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Replacing element in table
You can do point to table variables with the syntax tablename.variablename: X1=[9 6 9;3 2 7]; X2=[0 2;4 0]; X3=[3 1; 8 9]; X...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Matlab function doesnt run when called from AppDesigner
You're passing in characters containing numbers the values instead of the values themselves. Use str2num to convert before calli...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
why my figure doesn't show the same logarithmic response like the one in the attached figure?.
I'm not sure how to match the y axis values, your equation didn't have much info about DPD, but it looks to me like you're missi...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
how can i obtain just the real part instead of immaginary part ?
The functions real and imag pull out the real and imaginary parts: X = sqrt(-rand(3))+rand(3) R = real(X) I = imag(X)

mehr als 4 Jahre vor | 0

Beantwortet
how to solve Index must not exceed 300
If you refer to the 301st item in a list of 300 things, MATLAB will error At least one of the variables in your equation cont...

mehr als 4 Jahre vor | 0

Beantwortet
How can i apply standard diviation to the matrix?
You can use the std function to compute standard deviation

mehr als 4 Jahre vor | 0

Beantwortet
How do i Plot average velocity from given velocity time data?
You were very close, you don't see it because you've plotted a vector t against a scalar Vavg and MATLAB has interpreted this as...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How can I define a set of constants to be used by many functions without having to define them in each one?
There are several way to organize this, here are a few ideas that help you avoid global state: First, you could pack these 10...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
how can i truncte a matrix?
Are you asking how to take a 51 x 500 matrix and remove all but the first 71 columns? x = rand(51,500); x = x(:,1:71); % read ...

mehr als 4 Jahre vor | 0

Beantwortet
How to find the correlation of rows across 2 tables?
I think you're saying you want a correlation for each state-month? Here's a simple approach that uses a nested loop. You could d...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Appdesigner error: Index exceeds the number of array elements (2). Error in Robotprac/Joint3SliderValueChanged (line 93)
Above, you set L(3).qlim = [-90 90]; On the line that errors: l = L(3).qlim; % so l is [-90 90] q(3) = l(3) + ... % This s...

mehr als 4 Jahre vor | 0

Beantwortet
Error : "Check for incorrect argument data type or missing argument in call to function 'spawnTorpedo'."
spawnTorpedo is a (non-static, non-constructor) method, so the first argument should be the object: obj = torpedo; obj.spawnTo...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Semilog plot that includes curve fit
It turns out that semilogx is a shortcut for plot and setting the XScale property on the axes. So you can just do: plot(fitresu...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
multiaxes and tiles inside a loop, how to plot different values for each tile independently
Here are answers to each of your questions Q1: How can I plot a horizontal line of 0.3 in zone 1 and another horizontal line ...

mehr als 4 Jahre vor | 0

Beantwortet
Stacking multiple arrays into a matrix
You can make append two columns like this: a=rand(10,1); b=rand(10,1); c=[a b]; size(c) or like this: c=cat(2,a,b); size(...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Is there way to make heatmap with 3variabls?
To make an image like this, you need a matrix z which provides a point for each x and y. That's pretty easy to generate with i...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How do I create a simple loop to sum up the elements in my matrix assuming some elements vary.
You don't need a loop: a = rand(3,4) sum(a) % sum of each column, also sum(a,1) sum(a,2) % sum of each row sum(a,'all') % ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
how to plot impulses obtaining x and y values (non periodic) from 2 separate matrices
I think you were correct that stem is the correct command. I'm not sure why periodicity factors in, from your description...how ...

mehr als 4 Jahre vor | 1

Beantwortet
How can I know the name of my table?
This is confusing because the word table means a few things, and because it's not entirely clear what you meant by "my table". T...

mehr als 4 Jahre vor | 0

Mehr laden