Answered
How to display a table object in command window in a different color
There is no direct way. You have to create a string at first, e.g. using |evalc('disp(MyTable)')|. This suffers from the same...

9 years ago | 0

| accepted

Answered
How do I combine two DateNumber strings without resulting in all NaN values?
After |datenum| you have two double vectors. Then all details concerning dates are not relevant for question. d1 = [1, N...

9 years ago | 0

Answered
How to graph two different functions on different axes
I do not know "plotting along an axis". I know 2D diagrams using two axes and plotting y against x. E.g.: x = 1:0.01:2*pi; ...

9 years ago | 0

| accepted

Answered
Results of knnsearch do not make sense (to me)
point 34 is the nearest neighbor of point 72, but when one goes to point 72, its nearest neighbor is point 124 (I guess it sh...

9 years ago | 1

| accepted

Answered
I need help please.
The code does not contain an error. You do read the files in the correct order, but note, that this is the alphabetical order. T...

9 years ago | 0

| accepted

Answered
How can I access the Axle property in an axis ruler?
What about: ax.Box = 'off' This ax.XAxis.Color = 'none'; would influence the |ax.XColor| also and the tick label...

9 years ago | 0

Answered
Why not use square brackets?
Using square brackets, because they look matlabish and have anything to do with vectors, is Cargo Cult Programming, see <https:/...

9 years ago | 1

Answered
Delimiter for csv format
It is a strange method to read a file line by line by |frewind|-ing it in each iteration. It would be much cheapter to import th...

9 years ago | 0

Answered
What is the computation Power of Matlab Online?
You can run a shorter test function and compare the timings between Matlab Online and your laptop. Perhaps it is worth to det...

9 years ago | 0

Answered
Hello friends, can anyone please tell me that what is the best way to find the initial guess for dual solution using BVP4C code in matlab?
There is no general rule. This is a standard problem for boundary value problems. In many cases the problem is serious, because ...

9 years ago | 0

| accepted

Answered
errors with polling directory for new files to process?
while true clc; warning('off','images:initSize:adjustingMag'); loadimg = imread(full_filename); %proce...

9 years ago | 0

| accepted

Answered
how to vectorize this for loop
I assume you can replace the loop for i=1:no_f; xw(:,i)=w.*n(:,i); end by: xw = w .* n; % >= R2016b F...

9 years ago | 0

Answered
How to change step size of fmincon?
|fmincon| uses a bunch of different optimization tools and "stepsizes" occur in a variety of internal methods. Therefore you cou...

9 years ago | 0

Answered
Reduce lines shown in a surface plots
|surfc| replies the handle of the |surface| object and a list of handles to the patch objects. If you need the surface only, use...

9 years ago | 1

Answered
How to update mouse position when button is pressed in gui.
You can try to determine the mouse position by Java: MouseInfo = java.awt.MouseInfo.getPointerInfo(); Pos = MouseI...

9 years ago | 0

Answered
replacing the for loop please
Before you start to vectorize the code, did you pre-allocate the output before the loops? This is essential: L = (length(ti...

9 years ago | 1

| accepted

Answered
How can pause/stop/resume/run Matlab gui code?
You cannot directly stop Matlab code by a GUI. Note that the callback of the GUI would be stopped also. You can control the e...

9 years ago | 1

Answered
I have to remove ans= from this my function using your advice to no avail. Please help check what is wrong with my function below
It is not clear to me, what you are asking for. What exactly is the problem? Why do you assume that something is wrong? If yo...

9 years ago | 0

Answered
Programmatically performing "Expand axes to fill figure"?
To set the position as tight as possible: figure; AxesH = axes; drawnow; InSet = get(AxesH, 'TightInset'); set(...

9 years ago | 7

| accepted

Answered
How can I resolve the error 'Undefined variable "num2str" or class "num2str"' in a script using num2str function ?
I dare to answer the magic question: No, I'm convinced that your observation is incomplete. Copy&paste both codes from the forum...

9 years ago | 1

Answered
How do Iget a list from multiple rows?
Perhaps these are cell strings: data = {'he is #coming #today'; 'will #it rain?'}; words = strsplit(sprintf('%s '...

9 years ago | 1

| accepted

Answered
Variable Values Different in Workspace than when in Command Window
The question is not clear yet. Are your values: Y1 = [123908.819923327, 126870.594792914, 129848.477388450, 132835.40511230...

9 years ago | 1

Answered
How can I convert an array of doubles to a proper cell array with each element containing one nonempty character vector?
The question is not meaningful yet. Why do you want to set the property "VariableNames" of dataTable directly into a table objec...

9 years ago | 0

| accepted

Answered
"clear all" causing annoying warning messages
|clear all| clears Matlab's memory in a brutal way. While removing all locally used variables might be useful for scripts, which...

9 years ago | 2

| accepted

Answered
How to use logic between two points with only a negavite slope?
"Negative slope" sounds like: index = (gradient(file.data.X.signals.values) < 0); Or do you mean: v = filter(h, 1,f...

9 years ago | 0

| accepted

Answered
Computational complexity of expanding a vector
This is O(m): If |b| has the double size, you need the double work. You do not need any sorting. The size of the output is de...

9 years ago | 0

| accepted

Answered
How to extract data from ".asc" files in MATLAB??
fid = fopen(FileName, 'r'); if fid == -1, error('Cannot open file: %s', FileName); end data = fscanf(fid, '%g', [6, Inf]...

9 years ago | 1

Answered
Advice on running an experiment on several computers simultaneously please.
I'd prefer to share the M-files and store the output files in one folder shared over the network. This is easier to maintain, th...

9 years ago | 0

| accepted

Answered
Why is the message for my program Error using + Matrix dimensions must agree.??
If you did not pre-allocate W1nf and Tnf before the loop, these array grow in each iteration. Then Pijf is a [c, b+1] matrix. ...

9 years ago | 0

| accepted

Answered
how to write equation in matlab ?
phi = max(0, 1.5 * pi - ((x - 256).^2 + (y - 256).^2) / 3276.8);

9 years ago | 1

| accepted

Load more