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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

Beantwortet
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:...

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

fast 9 Jahre vor | 1

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

Beantwortet
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, ...

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 3

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

fast 9 Jahre vor | 1

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

Beantwortet
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);

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

Beantwortet
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 =...

fast 9 Jahre vor | 8

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 1

| akzeptiert

Mehr laden