Getting A Blank Plot From Code
Yp=62e9; Yfca=250e9; yfsi=480e9; d31=-320e-12; a=linspace(0,1); d31eff=-d31./((log(1-a)).*(1./a-0.5)); vp=1; d31multi=d31...

5 days ago | 0

How to add proper values on top of bar chart
Y1 = [-31.6 15.8 -8.0]; subplot(3,2,2) Vn4a_diff=15.8;Vn4c_diff=-31.6;Vn4b_diff=8; b=bar(2,Vn4a_diff,'FaceColor',[0 0.6 0.3],...

5 days ago | 0

Problem with if statements
e=["H","Li","Be","B","C","N","O","F","Na","Mg","Al","Si","P","S","Cl","K","Ca",... "Sc","Ti","V","Cr","Mn","Fe","Co","Ni","...

5 days ago | 0

Is there a way to create a loop for reading multiple Excel files at once?
time=[130,230,330...]; for i= 1:length(time) lum(:,i)=csvread(sprintf('PAR_TOP_%d.csv',time(i)),3,2); end

5 days ago | 0

| accepted

The results display problem
A= [1.02 0.95 0.77 0.67 0.56 0.30 0.16 0.01]; b = [0.39 0.32 0.22 0.18 0.15 0.12 0.13 0.15]; for i = 1:4 num = 10.^(-i);...

5 days ago | 0

| accepted

How to Call a Function Within a Script?
%execute function dydt=vdp1000(t,y);%must assign t and y prior to executing the function function dydt = vdp1000(t,y) dyd...

5 days ago | 0

Hi , i want to build a matrix
C=rand(1,3); B=rand(3,1); A=rand(3,3); n=size(A,1); a=eye(n); y=4; H=diag(repelem(C*B,n*y)); for k=-1:-1:-n*y+1 a=a+A^...

5 days ago | 0

| accepted

The summation of elements between two numbers
yourMatrix=rand(7,18)*90+10; s=sum(yourMatrix(yourMatrix>=35&yourMatrix<=55))

6 days ago | 0

Solving equation with one variable but it is present in the equation twice
It is easy to just solve for x in your equation and have an equation in Vout. f=@(Vout)(211200-1000*Vout)./(Vout+211.2); f(100...

9 days ago | 0

how to separate columns from txt file
Try: c = readtable("r4.4u_db.txt",'Format','%f %*c %f %*c%*c%*c %f %*c%*c');

9 days ago | 0

Index exceeds the number of array elements. Index must not exceed 272.
What are you trying to do? You cannot index into mean_value_data_smoth with a value greater than its size (272). You are indexin...

9 days ago | 0

Solved

Just square the input
Square the number

10 days ago

How do you replace NaN values in column n with the average of the all the values in column n?
r=rand(9172,27); r(randi(247644,1,10000))=nan;%add some nan's m=mean(r,'omitnan'); [~,idx]=find(isnan(r)); r(isnan(r))=m(idx...

10 days ago | 0

How to simplify a complicated output of a function with only double coefficients
Look at digits and vpa %just take the vpa of the result to however many digits of accuracy. digits 10 vpa(newton_interpolatio...

10 days ago | 0

| accepted

How do I change Array element with another array element?
A = [0 0 0 0]; B = [1 1 0 0]; A=B

10 days ago | 0

fplot graph error getting y=0
There is a sinularity around -5.6e-4 (advoid this area) math=@(x)0.6.*x.^3.*exp(-0.4./x)+1.5.*x.^2.*exp(-0.6.*x); fplot(math,[...

10 days ago | 0

| accepted

Base-2 logarithmic scale on bar diagram
A logarithmic scale does not matter what the base is. You can change the markers to whatever you want (powers of two). figure; ...

10 days ago | 0

| accepted

The plot of cosine is not shown
xt will always be 1 and is plotting correctly. cos(2*pi*100*t) will always be an interger multiplied by 2*pi, and cos(2*pi)==1.

10 days ago | 0

| accepted

How to fit lognormal distribution on my data
Look at lognfit [pHat,pCI] = lognfit(repelem(vector1,vector2));

11 days ago | 0

Triangle Circle Dataset Creation
Look at polyshape

11 days ago | 0

How to compare two arrays of strings?
Use string arrays instead of character arrays. A=["red","purple","blue","green"]; B=["orange","purple","yellow","green"]; C=B...

11 days ago | 0

problem with condtitions in program
Hard to understand what you are trying to do. Looks like you are good to about 72. t=[0.0840000000000000,0.935000000000000,1.83...

11 days ago | 0

Hi there, does anyone know how to help me resolve this issue? My code keeps running on and on. If you can help me figure the issue please :)? And also the plots are not showin
You are getting stuck in your positionfourbar() while loop. You need to evaluation your equations and comparison to epsilon.

11 days ago | 0

Solved

Exact Cover
An efficient solution to the exact cover problem can be useful in many situations. In this problem, you are welcome to use Knuth...

11 days ago

11 days ago | 0

l='abcdefghijklmnopqrstuvwxyz'; gap='defjklmrstuvwz'-96; l(gap)='-'

11 days ago | 1

| accepted

Solved

Is the number of 1s in a binary integer odd or even?
Your function should turn the input integers into binary form and count the number of 1s in the binary. If the number is odd, re...

11 days ago

Why does my else doesnt work?
a = [-3.821; 0.135; 5.995; -5.557; -4.041; -3.094; -3.244; -3.074; -1.241; -4.216; -2.834; -0.424; 5.337; -0.088; 2.985; 4.136;...

12 days ago | 1

| accepted

Solved

Cricket - Report the Result (Part I: Limited Overs)
Given two scalar strings representing the scores for a limited-overs match, return a string reporting the result in the form "Te...

12 days ago