Réponse apportée
Can you extract an element from an array in the same line as you create the array?
No, unfortunately in matlab, you cannot index directly into the return value of a function. You could use subsref as demonstra...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
cell and matrix and for roof function
First, what is the point of: Ncell_1=11; Ncell_2=21; Ncell_3=31; Ncell_4=41; Ncell_5=51; Ncell_6=61; Ncell=[Ncell_1,Ncell_2,Nc...

environ 7 ans il y a | 0

Réponse apportée
Loop through CSV (or XLS), compare values in rows and create new Cell Array based on results
As I commented, in my opinion what you're asking is not a good idea. Using cell arrays of cell arrays just make it more difficul...

environ 7 ans il y a | 1

Réponse apportée
Probability in printing text
Use randi to choose an integer between 1 and the number of strings, use that to index into a cell array of char vector or a stri...

environ 7 ans il y a | 1

Réponse apportée
While assigning a variable, is the variable cleared by default before the assignment?
Is output, internally cleared before executing the next loop? No. A variable is only cleared if you assign something else to ...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
Multiplication of rows in a single column
prod(yourvector)

environ 7 ans il y a | 0

Réponse apportée
Why do I get .txt extension eventhough it isn’t?
That reminds me that's something I wantedto discuss with Mathworks as it's indeed annoying. The reason has nothing to do with y...

environ 7 ans il y a | 4

| A accepté

Réponse apportée
How can I divide a week of a timetable into hours
hourlytimetable = retime(yourtimetable, 'hourly', 'mean')

environ 7 ans il y a | 1

| A accepté

Réponse apportée
Error on GUI code
I believe that the error in gui_maifcn is the problem of having the other two errors. Well, to be precise the error comes from ...

environ 7 ans il y a | 0

Réponse apportée
Table manipulation of matrix
Your question is really badly explained but I think I've understood what you want. My understanding is that you have a J matri...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How can I convert gray image to binary image on ”specific” value of luminescence
It's simple comparisons and logical operations: lower than 0.4 to black, higher to white (what about 0.4?) result = yourgreyim...

environ 7 ans il y a | 0

Réponse apportée
convert the datenum to date
d = 726329; datetime(d, 'ConvertFrom', 'datenum', 'Format', 'dd-MM-yy') %recommended, although I'd recomend using yyyy inste...

environ 7 ans il y a | 4

Réponse apportée
How do I change values in an array based upon its previous value?
Assuming you've made a mistake in your second step (see comment), this is trivially achieved with imdilate (requires image proce...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
how to create an object with "handle like" properties and "value like" assignment
That is simply not possible in matlab. "I want to make my api accessable to novice/average users and eliminate potential pitfal...

environ 7 ans il y a | 0

Réponse apportée
Writetable() to csv in different cells
table=table2cell(table); writetable(table,filename); will produce an error and not create any file, since the misleadingly nam...

environ 7 ans il y a | 0

Réponse apportée
Error using vertcat: dimension of arrays being concenated are not consistent
The error is simple. At least one of the rows of your A does not have the same number of elements as the others. Certainly, 0 ...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
error: no matching constructor for initialization of ... and mexFunction
I've fixed the link in comment. Note that you would still use mex, but the C++ mex interface instead of the C interface. Regard...

environ 7 ans il y a | 1

Réponse apportée
How to create a script in Matlab
It's a bit puzzling that you are aware of timetables and yet resort to deprecated functions such as histc (which has no concept ...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How can I write an excel file using the timer on MATLAB?
As others have said, defining the timer function as a string is the worst way of doing it. You get no syntax highlighting, no ta...

environ 7 ans il y a | 2

Réponse apportée
Outputting imported files in Matlab App Designer
At no point does your code attempt to import anything. DLR_siteA=fullfile(path,file); Ok, this store the full path of the file...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
I didn't know how to define my vector
In my version of matlab (R2019a), passing a vector to linspace give the following error: Error using linspace (line 22) Inputs...

plus de 7 ans il y a | 0

Réponse apportée
Could anyone help me to solve the error in the following code
There are many problems with your code. I gave up trying to guess which line is causing your error because of these. In any case...

plus de 7 ans il y a | 1

Réponse apportée
How to convert binary to floating points?
wavsingle = typecast(uint8(sum(wavbinary .* 2.^(7:-1:0), 2)), 'single')

plus de 7 ans il y a | 0

Réponse apportée
Import files into Matlab and compare values
Your question is not really clear. Does it matter that your data is in a spreadsheet? As far as I can tell, at the moment you're...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Audio file, Numerical amplitude data in table
It's trivial to convert your audio data to a timetable you can then retime that timetable to whichever period you want using whi...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
detection of hottest spot in wire
WHAT IS THE MEANING OF LINE filteredImage = imtophat(grayImage, true(50)); It performs top hat filtering of the image, using a ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Error using fseek - while running the matlab code. Input to the program looks fine.
Which version of matlab are you using (there's a field on the right at the top of this web page for you to fill in)? From the er...

plus de 7 ans il y a | 2

Réponse apportée
How do I pass a string from a C++ Mex file to the MATLAB workspace?
matlab:engine::setvariable seems to be the function to do that. With your original C++ code (not the C interface) matlabPtr->se...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Generating all ordered samples with replacement
For and , n = 20; k = 5; result = dec2base(0:n^k-1, n); %generate all n^k samples with replacement, as char vector 0-9 +...

plus de 7 ans il y a | 0

Réponse apportée
How do I find the element address in an array involved in a loop by applying conditions?
You haven't shown us how T is defined. Presumably it's an array with at least m+1 elements. This is not going to help with your...

plus de 7 ans il y a | 0

| A accepté

Charger plus