フィルターのクリア

How do I fix my elements in my code so that they can be the same?

1 回表示 (過去 30 日間)
Yianni
Yianni 2014 年 10 月 25 日
回答済み: Azzi Abdelmalek 2014 年 10 月 25 日
%I keep getting the error of 'In an assignment A(I) = B, the number of elements in B and I must be the same.' I believe the problem is with Bn, but I am not sure how to fix this.
clear all, close all, nfig = 0;
%Data in Problem
S = 1200; To = 40; k = 0.16; HH = 16; H = 16*(0.0254); WW = 10; W = 10*(0.0254); Ly = H/2; Lx = W/2; Nx = 101; x = linspace(0, W, Nx)'; nmax = 50; tol = 0.001;
Ln = zeros(1,nmax); Bn = zeros(1,nmax); for n = 1:nmax Ln(n)= ((2*n-1)*pi)/(2*Lx); Bn(n) = ((2*S)/(k*Lx))*((-1)^n)./((Ln.^3).*cosh(Ln*Ly)); end

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 10 月 25 日
Write
Bn(n,:) = ((2*S)/(k*Lx))*((-1)^n)./((Ln.^3).*cosh(Ln*Ly))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by