Respondida
how to get no of samples?
format long % this will explain why there are 298 samples a=1:10; no_samples=(10-1)/(10-1) %have to get 10 samples g=1:no...

más de 3 años hace | 0

Respondida
Connecting two Matlab scripts under one loop
A=100*rand(10,1); %input('enter wind speed mean\n'); %first part a = numel(A(A<0)); b = numel(A(A>10)); S = a+b; N = n...

más de 3 años hace | 0

| aceptada

Respondida
Next value in alphabet
p = 'a' % e.g. user enters input letter nextLetter(p) % output of nextLetter function [next] = nextLetter(p) Alphabet = {'...

más de 3 años hace | 0

Respondida
Sound absorption coefficient of membrane backed with air cavity
clc clear all; f= (100:2:1600); omega= 2*pi*f; rho_s=0.265; T=76.53*(1+1j*0.005); D=0.1; a=0.05; % Fig 2 a c=343; rh...

más de 3 años hace | 0

| aceptada

Respondida
convert matrix steps from 1 to 0.1
If you are plotting 0 to 0.1 sec using 1000 data points, the you have to divide it by frequency, 10 kHz data./10000 I...

más de 3 años hace | 0

Respondida
Unrecognized function or variable 'zvar'.
xlabel('xvar') ylabel('yvar') xlabel('zvar') If zvar, yvar and xvar are strings or numeric values passed to function ...

más de 3 años hace | 0

Respondida
error using knop 'value'
app.Knob.Value = changingValue

más de 3 años hace | 0

Respondida
Got this ''Empty sym: 0-by-1''
syms x; q = 1:3; w = 2; for k = 1:length(q) eqn = (3*x) + q(k) + w == 0; sol = solve(eqn,x); S(k) = double(vpa(sol,2)) ...

más de 3 años hace | 0

Respondida
One condition is not being fulfilled, and suddenly when i wrote on command window, give me a infinite menu, and i can not close it
clc, clear, close while true a=menu({'This program allows the fitting of functions to experimental points.', ... ...

más de 3 años hace | 1

| aceptada

Respondida
how to solve one variable in non linear equation?
clc clear all T=12; u1=400;u2=8;a=30;b=5;a2=100;A=500;c2=10;c3=12;c4=8;D0=115; b2=0.2; a=-1.1;d=11.2;m=-0.5;k1=1.5;k0=1.1;k2=...

más de 3 años hace | 0

Respondida
How to create a loop?
clear all clc format longG; format compact; txt = input ('Choose a Production Period: 1) Annual 2) Monthly 3) Weekly 4) Dail...

más de 3 años hace | 0

Respondida
generate and save numerous datas in one code then load them in another code
% in A.m file [p,q] = B % call the function wbich returns those outputs variables (values) n = p + q % add them directly as...

más de 3 años hace | 0

Respondida
Precision of rounding numbers
D = 1/(0.1*0.00001) fprintf('%.2d',D) % try using %d format specifier As you are using %f it is meant for floatpoint num...

más de 3 años hace | 0

Respondida
Open an "array" of filenames
Its possible to open multiple files as you intend. Use the sprintf function to open individual filenames identified using an in...

más de 3 años hace | 0

Respondida
Char not working properly ?
To display text on figure window, you should rather use uilabel function in place of uitextarea which produces same output as de...

más de 3 años hace | 0

| aceptada

Respondida
Save each output in one file
writematrix(peaksnr, 'psnrO.xls','Sheet', i)

más de 3 años hace | 0

Respondida
Where is the mistake? Taylor Series in matlab?
syms T alpha = 0.056; beta = 0.0000186; R = 2000; f = R*(alpha+0.0078*(T-25)+beta*(T-25).^2); f = subs(f,T,80); tayl...

más de 3 años hace | 0

| aceptada

Respondida
My simulation doesn't take into account the different height of the Faraday waves?
% Define physical parameters g = 9.81; % acceleration due to gravity d = 0.1; % fluid depth omega = 0.1; % forcing frequency ...

más de 3 años hace | 0

| aceptada

Respondida
Loop through multiple columns in table using if condition
X.A = [randi([0 10],1,7) NaN] X.B = repmat(NaN,1,8); for i = 1:length(X.A) if (isnan(X.A(i)) & isnan(X.B(i))) ...

más de 3 años hace | 0

| aceptada

Respondida
Iteration of writing videos
Place the below line close(cutvideo) Outside of the outer _for loop_ with index _k_.

más de 3 años hace | 0

Respondida
I keep getting this for my function and I don't know how to fix it -- Undefined function 'symsum' for input arguments of type 'double'.
format long N = [5 10 50]; Phi = prob2_6(N) % call function by passing vector of values with range N function phi = prob2_...

más de 3 años hace | 0

Respondida
Operation with large and small numbers
(1^4 + 1^4) + (23512^4 - 23512^4)

más de 3 años hace | 1

Respondida
variable store in loop
syms z x a v Y(1)=a T=0 for k=1:2 Y(k+1)=z; v=0; for l=1:k v=v+kroneckerDelta(str2sym('l-2'))*(k+2-l)*(k+1-l)*Y(k+2-l);...

más de 3 años hace | 1

Respondida
Unable to display variable as image
D = [16.1094 16.3903 12.4469 33.8613 6.7100 20.3669 27.7830 23.1273 10.9647 15.3839 43.2814 25.0800 4....

más de 3 años hace | 1

Respondida
Code Thermodynamics btech 3rd semester question to get results , plot graph if needed
p = 400*1e3; v1 = 0.05; v2 = 0.2; n = 1.1:0.01:1.7; W = (n./(n-1))*p*(v2-v1) plot(n,W); xlabel('polytropic exponent [n]');y...

más de 3 años hace | 0

Respondida
Storing and comparing values of an equation in loop
syms x f(x) f = x*exp(-2*x) F = diff(f,x) == 0 X = 0 : 0.1 : 1; idx = find(double(subs(F,x,X))) Max = X(idx) plot(X,doubl...

más de 3 años hace | 0

Respondida
Hello, how can I do a (for loop) for this equation to find more than one value of the CF ? Specifically, I mean more than one value for (xm)
xm= {[-1:4], [-5:-2],[-2:1]}; for k = 1:numel(xm) N=length(xm(k)); CF(k)= Coherence_Factor(xm(k),N); end CF function [CF]=...

más de 3 años hace | 0

Respondida
Hello, how can I do a (loop) for this equation to find more than one value of the CF ? Specifically, I mean more than one value for (xm)
xm = rand(5,10); N = 10; [CF]= Coherence_Factor(xm,N) function [CF]= Coherence_Factor(xm,N); CF = ((abs (sum(xm))).^2) ./ (N...

más de 3 años hace | 0

Respondida
Psychtoolbox-3: Error using Screen
charTex = cell(1,length(charList)); % create an empty cell array to store each new texture for i = 1:length(charList) ...

más de 3 años hace | 0

Cargar más