Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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)

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
How can i apply standard diviation to the matrix?
You can use the std function to compute standard deviation

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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(...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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') % ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 1

Réponse apportée
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...

plus de 4 ans il y a | 0

Charger plus