Answered
When i use value of a=10, my code gives an answer, but at a=9.7*10^-7, ans=0. What is wrong in the code?
Although you define "r, h, t" as symbolic variables, you re-defined them as inputs of an anonymous function. Do you want to crea...

9 years ago | 0

Answered
Please How do I write this sinusoidal funtion file?
You need square brackets for the outputs of a function: function [y,t] = Sine(a1,a2,a3,f1,f2,f3,fi1,fi2,fi3, tmin, tmax,del...

9 years ago | 0

Answered
how to make a 2 files .mat become 1?
It depends on what you want to merge: The data or the saved fields. * Case 1: The data: Data = rand(255, 2); % Some tes...

9 years ago | 2

Answered
close of gui resets current folder/path unintended
after closing, matlab does reset the path to project/_version1_ Matlab does not change the current folder without being inst...

9 years ago | 0

Answered
Delete rows with characters in cell array
If you want to remove all lines, which contain a non-digit and non-white-space: index = cellfun(@(ac) all(isstrprop(ac, 'di...

9 years ago | 1

Answered
Expanding a Matrix with Repmat/Reshape?
x = [3 6 7 10] y = [2 2 2 4] z = repelem(x, y); Or if this is the bottleneck of your code, try <https://www.mathworks...

9 years ago | 0

Answered
Shortcuts Gone After Restart
Perhaps all you have done is hiding the shortcut toolbar. Look in the "Layout" entry in the toolbar of the command window.

9 years ago | 0

Answered
A bug im simplify in the new Symbolic Toolbox?
You do not reach "the developers" here, because this is the public forum of all Matlab users. Please use the "Contact Us" link o...

9 years ago | 1

Answered
How can I check if a certain matrix is one of the cells of my cell array?
Try it with a simple loop: A = {[1 2;3 4] [2 2;3 3] [1 1;2 2]}; b = [1 2;3 4]; isInCell(A, b) function R = isInC...

9 years ago | 2

| accepted

Answered
Creating few columns of the Vandermonde matrix without using vander
You calculate the Vandermonde matrix from right to left. Is this intented? Do you want to get the n leftmost columns (smallest v...

9 years ago | 2

Question


Matlab 2016b command is black after Windows Update
After installing KB4034664 in the last days (10-Aug-2017), the contents of Matlab's command window is not displayed anymore: it ...

9 years ago | 4 answers | 3

4

answers

Answered
Store filename in cell array
DirList = dir(fullfile(folder, '*.bmp')); listOfFiles = {DirList.name}; for j=1:length(listOfFiles) fullFileNam...

9 years ago | 1

| accepted

Answered
[bug] boolean to uint8
If you need to typecast logical to uint8, use <https://www.mathworks.com/matlabcentral/fileexchange/17476-typecast-and-typecastx...

9 years ago | 1

Answered
iso downloads stop at 4GBs
This is the public forum, not the official support of MathWorks. They offer an installation support, so it would be the best ide...

9 years ago | 0

Answered
How to calculate the area of an input image?
This sounds like a job for the |size()| command. But what does "FULL" mean here and how does the user "inputs" the image?

9 years ago | 0

Answered
How to remove single quotes around the string
The quotes do not belong to the data. They are just added, when you display the cell string in the command window. Try this: ...

9 years ago | 1

Answered
create matrix from loop in matlab
The linear index is usually more efficient than the row and column indices: % 0<= a <=5 index = (0 <= b) & (b <= 5); ...

9 years ago | 0

Answered
How can I determine if my data is part of one population or another?
pop1 = randn(1000,1); pop2 = randn(9000,1)-1; pop = [pop1;pop2]; k = randperm(pop, 500); % or: randsample(numel...

9 years ago | 0

Answered
How to compile my C files in MAC? I need a help
You need to install XCode on the computer. Then run mex -setup What do you see? The version of XCode must match the requ...

9 years ago | 0

Answered
Generate an error that refers to the line where the error occurred.
The source code is the database already to solve the problem. Because Matlab is an interpreted language, you can work in the sou...

9 years ago | 1

| accepted

Answered
How to convert string into array?
Perhaps you mean: D = sscaf(area, '%g', [4, inf]).'; C = num2cell(D) Do you "cell", or is D the wanted matrix already...

9 years ago | 0

Answered
Smart and fast way to compute triple summation?
PART 4: Swapped loops: tic n = 50; l_s = numel(segments.batNetID); % # of segments L = sum(segments.NewLeng...

9 years ago | 1

| accepted

Answered
Smart and fast way to compute triple summation?
PART 3 - Suggestion for productive work: *[EDITED 13-Aug-2017 09:39 UTC]* New version with double speed: With inlined and ...

9 years ago | 0

Answered
Smart and fast way to compute triple summation?
PART 2 - Development A fixed loop now and a call of |mnpdf()| with a matrix input: load('data.mat'); tic n = 10; ...

9 years ago | 0

Answered
Smart and fast way to compute triple summation?
PART 1 - First ideas The power operation is very expensive: B = 0; for r = 0 : k A = segments.NewLength(s) / (k ...

9 years ago | 0

Answered
Mouse speed (frustratingly) slow when using ginput in R2015b
See also: * <https://www.mathworks.com/matlabcentral/fileexchange/38703-custom-ginput> * <https://www.mathworks.com/matlabce...

9 years ago | 0

Answered
How to solve error with accessing a multidimensional cell array?
You need the *complete* Yu matrix for each element of the cell array YY: [YF1, Fu1, Fc1] = pawn_cdfs(Yu, YY(:,j)); Avoid...

9 years ago | 0

Answered
hatch, shade between to functions
The first point I'd start to search is to ask an internet search engine for "Matlab hatch". You will find useful links on the to...

9 years ago | 0

Answered
I am trying to extract data from a .csv file that contains a header but I keep getting an empty array in return.
This is a unicode file, not an ASCII text. It starts with the BOM [255 254 13 0]. See <https://de.mathworks.com/matlabcentral/an...

9 years ago | 1

Answered
How to use root function inside for loop?
|C(k+5*(i-1),j)| is a scalar, but |roots([r3(i,j) r2(i,j) r1(i,j) -Volumes(k)])| can be a vector. The error message tells you, t...

9 years ago | 0

Load more