Risposto
How can I plot array ?
f = figure; p = plot(array(:,1),array(:,2)); p(1).LineWidth = 2; p(2).Marker = '.'; ax = gca ax.XLim = [0 0.55...

quasi 9 anni fa | 1

| accettato

Risposto
How to add a whole field at once (if possible)?
[etoile(1:3).luminosite_nxsoleil] = deal(120000,10000,50000)

quasi 9 anni fa | 1

Risposto
Why won't matlab 2017b calculate the inter quartile range or mean of an array with non interger values?
if you have conc_t = [1.2 2 3.4 5]; it's never going to work as indices in any matlab. when you say iqr = iqr(con...

quasi 9 anni fa | 0

Risposto
good morning , how can i plot a histogram for this code?
It's a good morning to read some documentation too, <https://de.mathworks.com/help/matlab/ref/histogram.html> Tl=exprnd(1:...

quasi 9 anni fa | 0

Risposto
Shift array bitwise and multiply with another array in matlab
use circshift <https://de.mathworks.com/help/matlab/ref/circshift.html> R = sum(x.*y) R1 = sum(x.*circshift(y,1)) R...

quasi 9 anni fa | 0

| accettato

Risposto
good morning everyone can anyone answer me this question ? i have an error in the matlab code
You don't need for loop and you should use ./ instead of / Nl=(1./Tl)*60*15; read this: <https://de.mathworks.com/help/ma...

quasi 9 anni fa | 0

| accettato

Risposto
3x3 Matrix - always Error "unexpected impression"
You use [] matrix_A = [1 2 3; 4 5 6; 7 8 9]; Instead of blindly trying random things, spend few minutes to read the docum...

quasi 9 anni fa | 0

Risposto
Plot several sets of data with the same X data but various Y data on the same figure with new Y origin
There's a FEX submission called sameaxis which does something similar, here is the link: <https://de.mathworks.com/matlabcent...

quasi 9 anni fa | 0

Risposto
How can I use simulation time in simulink as a variable in matlab?
You can define this variable on your workspace first and use it in simulink as simulation time.

quasi 9 anni fa | 0

Risposto
Plotting summation function in loop
Alright, you have defined lnR and X correctly, lnR = 0.2*rand(1,500); X = exp(lnR)-1.1; Then they have asked you to d...

quasi 9 anni fa | 1

| accettato

Risposto
How to implement Ramp/Soak to the PID block in Simulink ?
Take the ramp block on simulink and use it as your setpoint signal. <https://de.mathworks.com/help/simulink/slref/ramp.html> ...

quasi 9 anni fa | 0

Risposto
Use Matrix(Matrix == x) = y; on cell aray
you could use find, c(find([c{:}]==2))={1};

quasi 9 anni fa | 0

| accettato

Risposto
Why when sometimes i want to run a section matlab says on the bottom left right corner busy?
It means the commands on this section is being executed. If you got a loop there with 100000 iterations, yes, it will take some ...

quasi 9 anni fa | 0

Risposto
Getting multiple answers for a for loop of three iterations
I'd guess you'd want to store the output of |a| and |b| from each iteration in that for loop. Nevertheless you could do it simpl...

quasi 9 anni fa | 0

| accettato

Risposto
How to add value to wanted column in matrix after loop
Your question is still not quite clear. But I'll answer based what I understood. To create a 4x6 matrix with numbers from 1 to 2...

quasi 9 anni fa | 0

Risposto
Looking for multiple string subjects within excel input array
Use readtable! <https://de.mathworks.com/help/matlab/ref/readtable.html> It creates a table just like excel (with variable n...

quasi 9 anni fa | 0

Risposto
Plotting data from a table with a datetime in it, monthly records
Which version are you using? If it's 2016b or later, please use a timetable. You seemed to be trying to calculate monthly mean, ...

quasi 9 anni fa | 0

| accettato

Risposto
Equalizing array of uknowns with a known array
You can create a table, V=[0.012 2 0.47 100] S={'Mass' 'Volume' 'Width' 'Height'} T = array2table(V,'v',S) and n...

quasi 9 anni fa | 3

Risposto
how to change values from other script ?
Jan has explained it cleary but I'm just going to give you an example with functions. Firstly, you need to know the differen...

quasi 9 anni fa | 1

Risposto
randperm and sorting array
Change A_eks(:,:,k) = B_eks(:,id_sort); to A_eks(:,:,k) = B_eks(:,id_sort,k);

quasi 9 anni fa | 0

| accettato

Risposto
what is the result?
Did you read the documentation of |rand|? <https://de.mathworks.com/help/matlab/ref/rand.html> It says _X = rand returns a...

quasi 9 anni fa | 0

| accettato

Risposto
How can I use idx to apply different if statements to each column in a matrix?
participant_data = [390 0.45; 347 0.32; 866 0.98; 549 0.67]; shortlisted_data = participant_data((participant_data(:,1)>500...

quasi 9 anni fa | 0

Risposto
How do I create a variable on form YYYYMM when the data entries are on the form YYYYMMDD?
Do you store them as char array? If so, try dt_assignment4 = dt_assignment4(:,1:6);

quasi 9 anni fa | 0

Risposto
Separate date and time
if you have everything in datetime format inside the cell array, use this, dt = [C{:}']; datesonly = [dt.Day dt.Month dt...

quasi 9 anni fa | 0

Risposto
Grab filename with tdfread
use filename = uigetfile <https://www.mathworks.com/help/matlab/ref/uigetfile.html> then for the title of the plot, ...

quasi 9 anni fa | 0

Risposto
Variable Names and classes for Tables as well as using the Hour function on datetime variables?
For your first question, aren't you supposed to be using, B.Properties.VariableNames For the next question, what's the da...

quasi 9 anni fa | 0

Risposto
Display colorbar label horizontally and specify its position
*EDITED* pos = get(c,'Position'); c.Label.Position = [pos(1)/2 pos(2)+1]; % to change its position c.Label.Rotation =...

quasi 9 anni fa | 8

| accettato

Risposto
How to print Time Series array data..??
tsData.Data(tsData.Time==10) Instead of a screenshot, if you had explained the way you have stored your data and it's proper...

quasi 9 anni fa | 0

Risposto
Plot max, min, mean of a value in a matrix
Using a timetable makes this a lot easier filename = 'LONDON'; data = readtable([filename,'.txt']); data = data(d...

quasi 9 anni fa | 1

| accettato

Carica altro