Respondida
How to disable termination character while setting up serial object?
The matlab documentation provides all property values except that on how to disable the termination character. How about the 'T...

casi 7 años hace | 0

| aceptada

Respondida
while loop matrix problem
@galgool, before calling someone wrong please learn the language properly, in particular how if works when given a vector as an ...

casi 7 años hace | 0

| aceptada

Respondida
write table to .xls document with variable (cell array) not splitting into different cells
You can convert your elements column into text with: A.elements = cellfun(@num2str, A.elements, 'UniformOutput', false); If yo...

casi 7 años hace | 0

| aceptada

Respondida
Is there a program that allows a user to run a matlab script outside the software?
Mathworks offer a number of toolboxes that allows you to convert matlab code into something standalone, see Matlab coder and pro...

casi 7 años hace | 2

Respondida
How to sort a table within groups
I don't think you can use varfun for this. This is how I'd do it: group = findgroups(yourtable.Date); ordering = cell2mat(spli...

casi 7 años hace | 0

Respondida
how to change white background to black and black foreground to white?
The logical not operator is ~ (or you can use not): invertedI = ~BW %or invertedI = not(BW)

casi 7 años hace | 0

| aceptada

Respondida
how to get the only variable in file .mat autoumaticly
Your function signature is incomplete. Hopefully, you do know how to write a function properly. function FAmax = somename(vecto...

casi 7 años hace | 0

| aceptada

Respondida
creating complex MATLAB struct in C++ without using MATLAB Engine
The documentation of the mat-file format 5 is publicly available, so you can use that to construct your mat file. Unfortunately...

casi 7 años hace | 0

Respondida
How can I count specific value in one column but based on another four columns
Assuming that your dara is in a table (it would be useful if the example used valid matlab syntax): result = groupsummary(yourt...

casi 7 años hace | 2

Respondida
Creating combination matrix of all combinations
Use ndgrid and expansion of cell arrays into comma-separated lists : function c = cartprod(varargin) %c = allcomb(v1, v2, ...

casi 7 años hace | 1

| aceptada

Respondida
Delete empty field - rows in a structure
As commented, you may want to use a table instead of a structure. tables are a lot easier to use: t_track20 = struct2table(trac...

casi 7 años hace | 2

Respondida
How do I get every combo of a two vectors to put into an equation?
It's really not clear what your if statements are meant to do since you wrote some calculations that are not assigned to anythin...

casi 7 años hace | 0

Respondida
How to convert 24-bit signed hex from .csv file to an array of decimal data?
I agree with Jan that sscanf is nicer and for that reason: dataTable = readtable('demo.csv'); dataDec = rowfun(@(s) sscanf(s, ...

casi 7 años hace | 2

Respondida
Select and remove/replace values in matrix
One way: nelems = 2; %number of elements to keep X = (cumsum(Y>0, 2, 'reverse') < nelems+1) .* Y

casi 7 años hace | 2

| aceptada

Respondida
Importing csv file with scientific notation
Unfortunately, none of the high-level functions work with UTF16, so you have to go low-level. Even then, you'll get a warning th...

casi 7 años hace | 1

| aceptada

Respondida
Writing to Excel sheet from Excel Add-In function
Note that there's no need to go through get, you can simply your code to: xl = actxGetRunningServer('Excel.Application'); xlsh...

casi 7 años hace | 0

Respondida
Create dataset from multiple Cell arrays
For lack of answers to my questions, here is a more efficient method than the accepted answer: allpatients = vertcat(Results{:}...

casi 7 años hace | 2

| aceptada

Respondida
Excluding Constants from Consecutive numbers
[~, rows] = unique(D(:, 2), 'stable'); newD = D(rows, :)

casi 7 años hace | 0

| aceptada

Respondida
How to parse text data
Are you still on very old version (please fill the release field next to the question)?. If on a modern version, the file can ea...

casi 7 años hace | 0

| aceptada

Respondida
Why fwrite is ~320x slower in the second interation and onwards when writing interleaved data?
I would suspect the reason for the much slower writes in iteration 2 and onward is that for the first iteration, since the file ...

casi 7 años hace | 1

| aceptada

Respondida
Organising data from a matrix
selectedvalue = 4; filteredmatrix = yourmatrix(yourmatrix(:, 1) == selectedvalue, :)

casi 7 años hace | 0

| aceptada

Respondida
how can I read a file with the format '.cine'?
If you are talking about the video format produced by VisionResearch Phantom cameras, then they can provide you with some matlab...

casi 7 años hace | 0

Respondida
Isolating and running a piece of code separately from the rest
A complete guess, if you want to split A into groups that start when B is 0 and apply unwrap to each group: group = cumsum(B ==...

casi 7 años hace | 0

| aceptada

Respondida
How can I make a vector divide 1 by increasing numbers?
v = 1 ./ (1:10)

casi 7 años hace | 1

| aceptada

Respondida
convert numbers that contain the scientific notation e to the long format then round it to the fourth decimal?
I assume that what you mean is that you'd like matlab to display numbers as -0.0003 instead of 3e-4. If so, format shortg will...

casi 7 años hace | 0

Respondida
How to find array elements that meet a condition defined by an index vector?
It's not clear to me why L is a matrix of integers when the only value you care about is 5. Shouldn't it be a binary matrix? We...

casi 7 años hace | 0

| aceptada

Respondida
Cannot read data from a table to create a graph
The problem is that your timestamp column is text and matlab does not know how to use text as a plot variable. I assume that th...

casi 7 años hace | 0

| aceptada

Respondida
how to preallocate a variables
Again, with the code you show, there's nothing that can be preallocated. But your loops are also not very useful since the overw...

casi 7 años hace | 0

| aceptada

Respondida
Matlab doesnt recognize file in path while using readObj
sarl = readobj(something) Pass the content of the variable called something to the function readobj. If readobj expects a filen...

casi 7 años hace | 1

Respondida
64 bit binary number representation in matlab without rounding off
If matlab shows the number is 1.01010101010101e+41 then you do not have a binary number. You have a decimal integer number consi...

casi 7 años hace | 2

| aceptada

Cargar más