Respondida
How to ignore values in an array
Having read the question multiple times now, the crystal ball is suggesting you simply wanted to treat the first element uniquel...

casi 9 años hace | 0

| aceptada

Respondida
How to set ytick in yyaxis?
Almost--the function name is plural, not singular.. ... yticks([7.7:0.2:8.7]);

casi 9 años hace | 1

| aceptada

Respondida
Find repeated close values in array
Assume your data are sorted as shown; if not sort first. thsh=3000; % threshold for grou...

alrededor de 9 años hace | 1

| aceptada

Respondida
How can we call a variable defined in a function file to another script file?
Well, you had the right idea; you didn't show us the syntax used but you must refer to the variable that is returned from the fu...

alrededor de 9 años hace | 0

Respondida
Hello! I need to extract the lines which start with PG10 from this text file. Could you please help me. Thanks! I would use while loop but I am not sure how.
fmt=['PG10 ' repmat('%f ',1,8)]; fid=fopen('sp3data.txt'); PG10=[]; while ~feof(fid) PG10=[PG10; cell2mat(textsc...

alrededor de 9 años hace | 0

| aceptada

Respondida
How can i find largest 8 bit number from these 08 bit numbers i m getting ?
That's a new one to me...but, it's not of a lot of use for the purpose you're asking about as it is still a vector representatio...

alrededor de 9 años hace | 0

| aceptada

Respondida
Extra variable when opening a file using readtable.
Even without seeing the files, with almost 100% certainty there's an extra delimiter at the end of the record which makes it loo...

alrededor de 9 años hace | 0

| aceptada

Respondida
How to draw and delete a line in a graph
# for each step, the region have to always be visible -- the plot axes will auto-range to include the data. If the magnitude of...

alrededor de 9 años hace | 0

| aceptada

Respondida
What is missing from MATLAB?
|textscan| has only limited subset of the allowable formatting strings -- specifically, '%X' for hex data is missing. Why? Are...

alrededor de 9 años hace | 1

Respondida
Combining For Loop outputs into a Matrix
With a loop, you just index... b = 0:3; XY=zeros(3,length(b)); % preallocate the output array irow=0; ...

alrededor de 9 años hace | 2

| aceptada

Respondida
How to get Matlab to print both values and variable name
Couple of choice depending upon just how you want to use it... As a function, can retrieve the passed variable name with |inp...

alrededor de 9 años hace | 2

Respondida
Increasing efficiency of for loop cycling through 2 vectors
I did find a few minutes -- here's one approach that may or may not actually be quicker; I didn't have time for timing exercises...

alrededor de 9 años hace | 0

| aceptada

Respondida
How can I label the x and y axis in this plot using the name of the Excel columns?
a=xlsread(filename); % only returns the numeric data from the spreadsheet. Look at doc xlsread and use the alterna...

alrededor de 9 años hace | 0

| aceptada

Respondida
Using XLSWRITE with multiple arrays?
xlswrite('CarData.xlxs',[A B C]) presuming _A_, _B_, _C_ are column vectors of same size as are the variables in the |carbi...

alrededor de 9 años hace | 1

Respondida
How can I display images at multiple axes by clicking a pushbutton?
You'll need to save the axes handles for each axes when it is created, then update each in the button callback function. By def...

alrededor de 9 años hace | 0

| aceptada

Respondida
How can access elements of two cell at one time
data_array=cell2mat(data_cell); will return 256x1024 array (correcting previous inadvertent juxtaposition or row, column po...

alrededor de 9 años hace | 1

| aceptada

Respondida
how can this return a x2 value that does not meet -1.5<x2<1.5
Your starting conditions are unrealizeable as the argument to the arcsine function is out of range so none of the |if| clause ev...

alrededor de 9 años hace | 0

Respondida
Not a valid target for an assignment
... alpha01=[ones(30,1) coefficients(:,2) Y=(returns(n,:)-factors(t,4))'; The opening *[* of the first line isn't ter...

alrededor de 9 años hace | 0

| aceptada

Respondida
Subscript indices must either be real positive integers or logicals.
for ib1=1:nb1; |nb1| is undefined above... start1=bpo1(ib1)/L1*nel1*ndof; for i=1:2; ii=start1+i; for j=1...

alrededor de 9 años hace | 0

Respondida
how do you make a function out of a graph
See <http://www.mathworks.com/help/curvefit/parametric-fitting.html?searchHighlight=fitting%20models&s_tid=doc_srchtitle <Param...

alrededor de 9 años hace | 0

| aceptada

Respondida
How can I write a function that randomly sorts numbers into equal groups?
N=72; G=6; % constants per problem definition rnv=reshape(randperm(N),[],G); % separated into G c...

alrededor de 9 años hace | 1

| aceptada

Respondida
Get return values from cmd line 'live'
_" Is there a possibility, that you get the values in 'livetime'."_ Short answer, "no". Not from the |system| command route;...

alrededor de 9 años hace | 1

Respondida
convert a struct to a mxn cell array
FolderTrain = 'myfolderpath'; % specify the folder AllTrainFiles=fullfile(FolderTrain,'*.txt'); % full path...

alrededor de 9 años hace | 0

| aceptada

Respondida
Check elements in cell
The line if isequal(NAME_T,'Del Col_2010') inside the loop doesn't help because you don't index the cell array; |NAME_T| returns...

alrededor de 9 años hace | 0

Respondida
Difference between num2cell(1:4)' and {'1','2','3','4'}' ?
As the error message says, the cell _content_ must be character string and Adam notes the difference between the two forms you w...

alrededor de 9 años hace | 1

Respondida
Converting string to number in table with mixed values
Use a lookup table; since it is the atomic table; build it for completeness(*) once in the app but for the specific case the exa...

alrededor de 9 años hace | 0

| aceptada

Respondida
How to calculate moving average
<https://www.mathworks.com/matlabcentral/answers/329590-efficient-weighted-moving-average#answer_258475 <Efficient-weighted-movi...

alrededor de 9 años hace | 0

Respondida
/n %H as a string
Have to double-down on the control characters to prevent them being interpreted and to print instead... >> str='puts "\\nAna...

alrededor de 9 años hace | 1

| aceptada

Respondida
How to remove specific axis labels not the nimor ticks from a MATLAB figure?
set(gca,'xtick',10.^[-10:2:0]) For more generic coding set the two limits as variables, say powLo and powHi.

alrededor de 9 años hace | 0

Respondida
Please determine the value of the Matlab expression: 25>=(~4|5)||(5-3)
25 >= 1 --> _'True'_, ergo 1 The more important question is probably why would you ask; what isn't obvious?

alrededor de 9 años hace | 0

Cargar más