Réponse apportée
delete all zero columns and the same columns in another matrix
You could try something like this zerosLocations = ~A; idx = (sum(zerosLocations) == size(A,1)); A(:,idx) = []; B(:,...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
Reducing matrix dimension to a lower dimension
it looks like it is the squeeze command that you are looking for? Have you tried this: squeeze(X);

environ 10 ans il y a | 6

| A accepté

Question


force code gui on start up
so I am trying to create a GUI programmatically instead of through guide which I have used up to now. However, I am stuck with t...

environ 10 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Define filname for exported data with GUI
the save command saves the data in .mat format by default. It is not possible to write to xls format with this command, only to ...

environ 10 ans il y a | 0

| A accepté

Question


convert values to string
I have a vector with values to define groups (groupValue, in this case 1000x1 array with values from 1 to 5) I also have a cell...

environ 10 ans il y a | 3 réponses | 0

3

réponses

Réponse apportée
How to place multiple csv files along coloum, side by side, in a single file.
this can be easily achieved with the following code listing = dir(nameFolder); N = numel(listing); data = []; for ...

environ 10 ans il y a | 0

Réponse apportée
How to extract data from .txt file that has both text and numerical data?
this is not so difficult to achieve just define the appropriate HeaderLines as optional argument to textscan and it should wo...

environ 10 ans il y a | 2

Réponse apportée
time for 50 events
if you have the data in matrix format you could do this timeVector = datenum(data(:,1:6)); timeVectorEvery50 = timeVecto...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Need help getting this code to plot
it is not clear what you want to do but is it something like this? function plotting(gridSizes) cap = zeros(len...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
what does pred means in the command (dist ,path, pred)=graphshortestpath(G,S)?
just write the following command in your matlab: doc grap​hshortestp​ath This will tell you that: ... pred contains...

environ 10 ans il y a | 0

Réponse apportée
I have timeseries with 15 minute time stepp. How can I screen one hour times series (cumulative) from 15 minues time series.
since you stated that the time step is not fixed you cannot use reshape but you should use a combination of histc and accummarra...

environ 10 ans il y a | 0

Réponse apportée
how do i plot hh:mm:ss format in x axis where my x axis is containing no. of sample points...???
have you looked into xtick and xlabel commands?

environ 10 ans il y a | 0

Réponse apportée
Remove units from a string
just use textscan rawData = textscan(yourValue,'%f%s'); value = rawData{1}; units = rawData{2};

environ 10 ans il y a | 0

Réponse apportée
How do I save data into a txt file from a xls file?
Do you mean something like this? Since you did not attach a file, I could not do a test run so this code probably still contains...

environ 10 ans il y a | 0

Réponse apportée
How to find a value of a vector from another one?
is this what you mean? B(A==200)

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Create a plot with a function in a loop?
you have to use the hold on command such that you are adding with plot to the current figure without overwriting your previous ...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Keyboard interaction using GUI and callback error
have you tried this: function figure1_WindowKeyPressFcn(hObject, eventdata, handles) switch eventdata.Key ca...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
how to find blocks of values within array where difference is less than X for a specific number of values without losing the last value?
if you also want the last value why don't you just write endPos = falling(wideEnough); instead of what you currently ha...

environ 10 ans il y a | 0

Réponse apportée
simple error on plotting
this should work, are you sure that you have not redefined the plot function or used it as a variable name?

plus de 10 ans il y a | 0

Réponse apportée
Unravel.c function will not compile despite multiple attempts to debug it.
just going through the errors given by the mex-compiler: you are missing a bracket on line 53, right after mxGetN(prhs[2] you...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
assigning a vector to a function
you do not have enough information in your question, why do you not add the relevant code? if in your function file you have ...

plus de 10 ans il y a | 0

Réponse apportée
Improper assignment with rectangular empty matrix
first of all, do you want to store the values of dateAll for each iteration or do you only want to use it inside your dateloop? ...

plus de 10 ans il y a | 0

Réponse apportée
Need help in running multiple loops and saving separately
you can use sprintf to generate a unique file name for which you will store your graph so in each loop, after creation of you...

plus de 10 ans il y a | 0

Réponse apportée
question about x(1:n) vs x(n:1)
you can use this to create a column vector since you just need to define that there is only one column x(1:n,1) = 20; bu...

plus de 10 ans il y a | 0

Réponse apportée
Datevec to Datetime conversion results in 1 millisecond error?
I do not seem to be able to reproduce this deviation, so how did you obtain the DV and DT variables? >> timeVec = [2015 8 1...

plus de 10 ans il y a | 0

Réponse apportée
conversion of a date/time column into serial date number and seperate time column
use datenum and a format specifier (assuming X is your variable and Y is the requested variable) numFormat = datenum(X{:,1}...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
why is uigetfile not reading files the same way as xlsread?
did you even read the documentation on uitgetfile? It does not return the data inside the file, it just returns the name of the ...

plus de 10 ans il y a | 2

Réponse apportée
How can I make the spacing in a table more consistent? Also, how could i rearrange the table's names to match the one in part 2d?
have you tried to use the tab delimiter in the fprintf statement as suggested <http://www.mathworks.com/matlabcentral/newsreader...

plus de 10 ans il y a | 0

Réponse apportée
drawing a line using drawnow
it is not at all clear to me why you are using a for loop for this why not just use t = 0:0.01:5; X = x_1+(x_2-x_1)*t; ...

plus de 10 ans il y a | 0

Réponse apportée
How to display the legend NOT superimposing the plotted functions?
set the location of the legend to a location outside the figure, depending on what you prefer Norhtoutside, Southoutside, NorthE...

plus de 10 ans il y a | 0

| A accepté

Charger plus