Respondida
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 ...

más de 4 años hace | 0

Respondida
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...

más de 4 años hace | 1

| aceptada

Respondida
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...

más de 4 años hace | 1

| aceptada

Respondida
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...

más de 4 años hace | 1

| aceptada

Respondida
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...

más de 4 años hace | 0

Respondida
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...

más de 4 años hace | 1

| aceptada

Respondida
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...

más de 4 años hace | 0

Respondida
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...

más de 4 años hace | 1

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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 ...

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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)

más de 4 años hace | 0

Respondida
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...

más de 4 años hace | 0

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

más de 4 años hace | 0

Respondida
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...

más de 4 años hace | 1

| aceptada

Respondida
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...

más de 4 años hace | 1

| aceptada

Respondida
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 ...

más de 4 años hace | 0

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

Respondida
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...

más de 4 años hace | 1

| aceptada

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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 ...

más de 4 años hace | 0

Respondida
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(...

más de 4 años hace | 1

| aceptada

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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') % ...

más de 4 años hace | 0

| aceptada

Respondida
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 ...

más de 4 años hace | 1

Respondida
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...

más de 4 años hace | 0

Cargar más