Beantwortet
1 == 0 ?
Replace if matrice(m,n) == 0 by if matrice(i,j) == 0 Currently you are checking the last element of the matrix in each itera...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To perform elementwise matrix powers, use '.^'.
This line is failing: i0_a = (i0_ref_a) * (Glucose_conc/Glucose_ref)^(gamma_anode); The error message contains some valuable h...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
In the function datenum's formatin, does the 'HH' represent the same as 'hh'?
This is Matlab. Simply try it: test2=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25]; newStr=num2str(test2');...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to concatenate binary strings?
s = char('0' + randi([0,1], 8192, 8)); % Some test data r = reshape(s.', 32 * 8, []).'; % Create a 256 x 256 matrix

mehr als 4 Jahre vor | 1

Beantwortet
Plot not shown in for loop
Exactly. Give Matlab a chance to update the output by inserting the command: drawnow inside the loop.

mehr als 4 Jahre vor | 0

Beantwortet
How to insert an image into an image in matlab ?
image1 = rand(100, 200, 3); % Noisy image2 = ones(20, 30, 3); % White s1 = size(image1); s2 = size(image2); image3 = i...

mehr als 4 Jahre vor | 1

Beantwortet
Is there a way to convert binary with Don't care to corresponding decimal values in MATLAB?
You can ectract the wanted bits by bitget such that the ignored bits simply vanish.

mehr als 4 Jahre vor | 0

Beantwortet
What's the link between the size of XData and the original graphic?
The values of the line have a range until 22028.5, which is the "2x10^4". The number of values can be 1025. This means, that t...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to generate a matrix with entries of -1 and +1 of size N x M where all the columns are unique ?
N = 3; M = 8; R = 1 - 2 * rem(floor(pow2(1-N:0).' .* (0:M-1)), 2)

mehr als 4 Jahre vor | 0

Beantwortet
Is it possible to download MATLAB R2015b 32-bit?
Yes. If you have a license for a current version, you can download and install an old version also.

mehr als 4 Jahre vor | 0

Beantwortet
I have issue to resolve the equation using the For loop as MATLAB isn't providing this opportunity.
L = [0 100 200 200 200 30 300]; P = [0 1500 1700 1600 2000 1800 3000]; n = 5; twt = zeros(1, 5); for k = 1:5 twt(...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
vecnorm seems slower than it should be
I can confirm your observation. A = rand(1e4, 1000) - 0.5; tic for k = 1:50 x1 = mean(abs(A),2); end toc; % Overhead ...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Alternative method to dec2bin function
Some simplifications: % Replace: flag = true; while flag == true % by while true If you have checked for: if bin(i) == ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
For loops in strings
energy = zeros(1, 50); for k = 1:50 [data, fs] = audioread(sprintf('Sound(%d).wav', k)); energy(k) = sum(data.^2); ...

mehr als 4 Jahre vor | 0

Beantwortet
I keep receiving an error saying "execution of script drawpolygon as a function is not supported", even though it has previously worked.
The message means, that drawpolygon is a script. Then it does not have input nd output arguments: h = drawpolygon; % ^^^ om...

mehr als 4 Jahre vor | 0

Beantwortet
How can I split measured data in separate vectors, depending on sign value?
Start with a simple loop approach: v = [1 2 3 4 5 4 3 2 1 2 3 4 5 4 3 2 1]; dv = [false, diff(v) > 0, false]; ini = strfi...

mehr als 4 Jahre vor | 0

Beantwortet
csv file to matlab
Do you mean "import"? What about csvread or the modern readtable?

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Group consecutive and non-consecutive values in a vector
nV1 = 8; V2 = [1,2,4,6,7]; grp = cumsum([true, diff(V2)~=1]); C = splitapply(@(x) {x}, V2, grp); if V2(end) == nV1 C...

mehr als 4 Jahre vor | 3

| akzeptiert

Beantwortet
how to get/obtain a specific column of a cell array
While this is trivial using the original numerical matrix, it is a mess using cells. This shows, that for your problem the decis...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
how to add graph to output text file???
Text files cannot contain diagrams. So either export the diagrams and import them together with the text to e.g. Word. Or create...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How I download Matlab compiler toolbox free trial
MathWorks does not offer free trials of the compiler toolbox, as far as I know. You can get an official answer by asking the sal...

mehr als 4 Jahre vor | 0

Beantwortet
Interpolate strings from an x y interval to a corresponding x y interval.
The solution is not to do this with strings directly, but with indices: idx = interp1(table1{:, 1}, 1:height(table1), table2{:,...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Need to plot points
scatter() is a "high-level" function for drawing. Such functions clear the contents of the axes automatically. To collect the ou...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
i have a list of data and i have to select first 5th column of each row ..then simultaneously 6th column and 7th column
With some guessing: T = table(categorical({'karan';'varun';'ravina'}), ... [25;45;12],... {'Surgery';'orthopaedic';'o...

mehr als 4 Jahre vor | 0

Beantwortet
Save data in cell using get function
I'm not sure, if I understand, what you are asking for. This part of the code looks strange: app.tables = cell(1, length(loadf...

mehr als 4 Jahre vor | 0

Beantwortet
STL file from catia apparently empty?
As I thought, the file does not contain any data. The contents is really: solid CATIA STL endsolid CATIA STL Of course, this ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Why do I get an infinity number in matrix X2?
X3 is growing massively until it reachs Inf. Simply insert some output, e.g. by removing the semicolon from "X2=X3;" to observe ...

mehr als 4 Jahre vor | 0

Beantwortet
How can I manipulate with fields in structure.
A loop over the field names can achieve this: s = struct('field1',zeros(44,1),'field2',ones(44,1),'field3',randn(44,1)); % Tha...

mehr als 4 Jahre vor | 0

Beantwortet
Cell2mat not working for high cell count
This means, that the arrays stored in the cell do not have matching sizes. Check this: sizeZ = [cellfun('size', z(:), 1), cellf...

mehr als 4 Jahre vor | 0

Beantwortet
Finding erf using Maclaurin series breaks down around x = 5
Your code is almost correct and working, except for: factorial(n). When n is a double, this tends to overflow soon. So calculate...

mehr als 4 Jahre vor | 0

| akzeptiert

Mehr laden