Answered
Reading a file, storing data as variables, but unable to access them?
_"...when I run my program, I get 'ans' instead of any variable 't'"_ Because you're calling the function without a LHS into ...

9 years ago | 2

| accepted

Answered
How can I format fscanf to read strings of different lengths, some with spaces in them?
Can't always read a mal-formed input file; if the data strings contain embedded blanks they need to be quoted strings. Probab...

9 years ago | 0

Answered
How to read data from txt between 2 lines with the same symbol?
That's pretty simple to do, actually... fid=fopen('yourfile.txt'); % open the file while ~feof(fid) % begin ...

9 years ago | 1

| accepted

Answered
How can I sort my data by within a sorting
doc sortrows Following up on previous note -- given >> x=rand(10,1); y=rand(size(x))-0.5; >> [x y] ans = 0.15...

9 years ago | 0

Answered
Help with displaying the vowels
Use the string a cell array processing features of Matlab.. test={'Opal','Otis';'Fib','Lupe'}; isvowel=@(s) ismember(low...

9 years ago | 0

Answered
Subplots: Plots do not have all their properties
Maybe be "more better" ways; I've not much practical experience with |copyobj|, but the following seems to get you where you wan...

9 years ago | 1

| accepted

Answered
How to delete zeros from a vector and place it again in that vector?
_"Is there any MATLAB functions available...?"_ Actually, there is for the particular case of removing/recovering zeros -- ...

9 years ago | 2

Answered
How to delete zeros from a vector and place it again in that vector?
Once you've thrown away the zeros, they're gone -- there's no way of knowing where they were in the original _A_ from _B_ alone....

9 years ago | 2

| accepted

Answered
How to correct Reshape error
_"Is there an obvious solution I'm missing?"_ Not necessarily so obvious solution, but an apparent problem... reshape(Gri...

9 years ago | 0

Answered
reject input if it is a string
From the documentation we find that |input| _"requests user input , ... waits for input from the keyboard, evaluates any express...

9 years ago | 1

Answered
how to make a contour with time variable on x-axis
If |contourf| isn't yet datetime aware, convert to |datenum| instead which are just a double. Then you'll have to use |datetick...

9 years ago | 0

Answered
When I make a system call from matlab in Linux, does it use a different thread?
(On reflection, I think my subsequent comment actually answers the question pretty-much in toto so I'll put it here instead --dp...

9 years ago | 0

Answered
What is missing from MATLAB?
Quite a lot on the graphics side...just a couple to start reminded by the Answer I just gave (for about the umpteenth time) on h...

9 years ago | 0

Answered
How do i label each bar in bar group with a "string" on top?
... hB=bar(y); % use a meaningful variable for a handle array... hAx=gca; % get a variable for the current...

9 years ago | 7

| accepted

Answered
control chart on new data
A control chart plot is just a line plot with specific values...you can add to it just like any other plot by setting |*hold on*...

9 years ago | 1

Answered
I am trying to approximate the global minimum of a function within a given domain, and the index of that global minimum.
Well, that'll only be as good as the granularity of the points at which you evaluate the function but x=[x0:dx:x1]; [xmi...

9 years ago | 0

Answered
Function takes too long time to run and Warning in interpolation
First section can be rewritten as ix=any(Rand_dHw<= 0),2)|any(dHw_mu<=0,2)); % find any rows with zeros in either Rand...

9 years ago | 0

Answered
Run Win32 executable and get status of completion...
I answered this in your question added to the other thread; this confirms the issue is the one I addressed there -- Win32 progra...

9 years ago | 1

Answered
Calculate average for 0.01 step in first column
I'd already posted this once but there was no Answer connected so I'll try again... Presuming no missing data, use the native...

9 years ago | 4

Answered
Subtract column from previous column in for loop
Presuming I infer your meaning precisely... >> x=randi(200,4,3) % sample dummy data x = 127 182 ...

9 years ago | 0

| accepted

Answered
How does a mex function work ?
The author should have written the help information into the associated m-file that calls the mex function or at least commented...

9 years ago | 0

Answered
How to make this code for more efficient or run in less amount of time? The code works same a pdist2(A,A), but pdist2(A,A) function takes few seconds only, why is that?
Two things... 1. After the preliminaries are out of the way, |*pdist2*| has the following-- % Call a mex file to compute...

9 years ago | 0

| accepted

Answered
Running .exe file from MTLAB using system() and Wait until the program closes
>> help system system Execute system command and return result. [status,result] = system('command') calls upon the op...

9 years ago | 0

Answered
How to plot live data from arduino on current HH:MM x axis
Create the initial figure and a line handle something like figure hL=plot(t,nan,'datetimetickformat','HH:mm'); hold o...

9 years ago | 0

| accepted

Answered
an issue with Matrix Index exceed Matrix
Use the debugger to see where your implementation logic breaks down...but, the problem arises from function IDX =ExpandClus...

9 years ago | 0

Answered
Index exceeds matrix dimensions.
... yN = 0.4000 yc = 0.3000 y = 0.3000 E = 0.3844 Index exceeds matrix dimensions. You've got all...

9 years ago | 1

Answered
how to read grid data from text file ?
# Read the file as block of cellstr, convert to character array # Convert char array of 12x75 to 1*900 line=reshape(blk.',1,[...

9 years ago | 2

Answered
Why does legend('Position') overwrite strings?
_"What am I doing wrong with legend('Position',...)?"_ Assuming that the text string _'Position'_ is going to be interpreted ...

9 years ago | 0

| accepted

Answered
plot graph with dates for different years
Create a |*datetime*| vector for the data and then select by month and day with logical addressing to build the datasets for eac...

9 years ago | 0

Answered
How to add names to table variables from a large cell with names?
Looks peculiar orientation as doesn't keep the similarly-valued variables together, but per your request-- >> t=array2table...

9 years ago | 0

| accepted

Load more