Answered
How to convert cells within cells to double.
>> a=rand(1,20); a=num2cell(a) c=(cell2mat(a)) a = 1×20 cell array Columns 1 thro...

8 years ago | 0

Answered
Why does it give an error of "Array indices must be positive integers or logical values."
clear; clc; close all; k1=0.005; Cao= 31.553; K1=0.0012; K2=0.0025; k2=0.003; INPARGS=[k1 Cao K1 K2 k2]; tspa...

8 years ago | 0

Answered
I want to solve the equation (iv) as a function of E0 as shown in the attached picture. I tried to calculate it using the following code. I am stuck in this problem! please help
r=5*10^-9; V=4/3*pi*r^3; Nd=10^17; E0=19; Ld=18.5*10^-9; E=E0+1/6*(r/Ld)^2; Nr=Nd*exp(-(E0+(1/6)*(r/Ld)^2));...

8 years ago | 0

Answered
How to force maltab to continue with next value of for loop index if it encounters NaN or infinity in the present loop.
if ~isfinite(yourvariable(i))==1 continue else do this end

8 years ago | 0

Answered
YI 4K Action camera
Follow the instruction given in the link below: *<https://www.mathworks.com/matlabcentral/answers/12036-how-do-i-use-my-smart...

8 years ago | 0

Answered
What does the T in this code mean?
The first T = (a/b)' It is the solution of equation which is solved and transposed to make the next step easier ,and then ...

8 years ago | 0

Answered
"Unable to perform assignment because the indices on the left side are not compatible with the size of the right side."
try: %% question 3 for loop_counter=1:numel(First) Fourth(loop_counter,:)=data_modifier(First) Fifth(...

8 years ago | 0

Answered
trying to indexing array x(a:b) in a function but got all 0s
_trying to indexing array x(a:b) in a function but got all 0s_ Save x(a:b) in a variable and then pass onto the function and ...

8 years ago | 0

Answered
Populating a matrix with values of the same index of two separately met conditions
var4 = var3(var2 >= 1 | var1 >= 1); newtime = time(var2 >=1 | var1 >= 1);

8 years ago | 1

| accepted

Answered
Is there something wrong with this function?
function [result]=data_modifier(data1) if isfloat(data1)==1 sqrt(data1) else floor(data1) end end

8 years ago | 0

| accepted

Answered
HELP function y=lagrange (n,x,y) ↑ Error: Function definition not supported in this context. Create functions in code file.
%SCRIPT FILE x = yourdata y = yourdata n = your_data Y=lagrange(n,x,y) %function calling %FUNCTION FILE ...

8 years ago | 0

Answered
How to convert 2*1 cell array into 1*2char array
Tier={'T2';'S2'}' egr=Tier c=char(egr)

8 years ago | 1

Answered
Solve when a Function of x and y is equal to zero.
It would be as follows: eqn1 = FX==0 eqn2 = FY==0 [x,y] = solve(eqn1,eqn2,x,y)

8 years ago | 0

Answered
Using a function as an input to another
function [X y] = M(d) %like this not sure what you want to do but a guess X = d; [~,Y] = d; [A B] = @N function [A...

8 years ago | 0

Answered
How can I check that my solution is accurate to within 10^-9.
see *<https://in.mathworks.com/help/symbolic/increase-precision-of-numeric-calculations.html vpa>* precision goes until 32

8 years ago | 0

Answered
How can i explain this to matlab?
if ~isempty(vector)==1 Do this end

8 years ago | 1

| accepted

Answered
Extracting data from readtable
T = readtable('Mycsv.csv') %correct syntax

8 years ago | 0

Answered
Get a numerical result after a symbolic declaration.
subs(F_D,q)

8 years ago | 0

Answered
Rotate part of an image?
<https://www.mathworks.com/help/images/ref/imrotate.html>

8 years ago | 0

| accepted

Answered
Warning: Explicit solution could not be found
If you have lot of symbolic variables MATLAB's symbolic engine won't be able to solve such equations

8 years ago | 0

Answered
Shaping a vector.
>> A = [0 0 0 2 5 3 6 0 0 0 9 5 6] B = [ 6 9 8 3 8 7 2] idx=(A~=0); A(idx)=B; C = A A = ...

8 years ago | 0

| accepted

Answered
Finding the roots of a transcendental equation
clear all syms E V= 3; c=2; LHS = sqrt(-E) RHS = sqrt(E+V)*tan(c*sqrt(E+V)) h=fplot(LHS) h.Color = 'r' ...

8 years ago | 0

Answered
plot figure stem subplot
n1 = 0:50; f1 = 0.05; phase1 = 0; peak = 1.0; A1 = 1.0; arg1 = 2*pi.*f1.*n1 + phase1; u=255; x1 = A1...

8 years ago | 1

| accepted

Answered
Load multiple matrices and do calculations.
see *<https://in.mathworks.com/matlabcentral/answers/423769-read-specific-string-from-multiple-txt-file-and-output-in-new-txt-fi...

8 years ago | 0

Answered
Coding a solution to a second order ODE with ode45 or simulink
[t,f] = ode45(@pendulum, [0 20], [0 4]); % calling of the function plot(t,f(:,1),'g') hold on plot(t,f(:,2),'r') ...

8 years ago | 1

| accepted

Answered
store end values of an array in a nexted loop
After the loops: mean(rRE_MU_R)

8 years ago | 0

Answered
Please how can I convert the some values of my cell array from 0 to NaN
An example: a={zeros(1,12)} a=cell2mat(a) a(a==0)=NaN a={a} celldisp(a)

8 years ago | 0

Answered
Remove all zeros from a vector (preallocated unused spaces)
RE = [0.9808 0.488 0.0819 0.11491 0 0 0 0 0 0 0 ] nonzeros(RE) %removes zeros

8 years ago | 0

| accepted

Answered
mu law expander error
T = 10*(1/50); Fs = 10000; dt = 1/Fs; t = 0:dt:T-dt; x4 = sawtooth(2*pi*50*t); u=255 expander = ((-1 + (1...

8 years ago | 0

| accepted

Load more