Error using Xls write

9 vues (au cours des 30 derniers jours)
pepsodent
pepsodent le 30 Oct 2015
Modifié(e) : pepsodent le 30 Oct 2015
Error using xlswrite (line 219) Invoke Error, Dispatch Exception: Source: Microsoft Excel Description: Microsoft Excel cannot access the file 'C:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\7136D000'. There are several possible reasons:
• The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook.
This is my code :
clear all clc n=input('Enter the number of cases do you want to analyze : ' ); for num = 1 : n [u1,u2,u3,t,dx,dt,a,x]=inputdata; if num==1 figure plot(u1(:,1),'k'); xlabel(' \itX \rightarrow '); ylabel(' u(x,1)\rightarrow)'); end dt u1=firstupwind(t,dx,dt,a,x,u1,num); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function u1=firstupwind(t,dx,dt,a,x,u1,num)
c=a*dt/dx; if c>1 fprintf('c=%g, Enter another Courant Number\n',c); return else for i=1:int32(t/dt) for j=2:x-1 u1(j,i+1)=u1(j,i)-c*(u1(j,i)-u1(j-1,i)); end end end
filename='firstupwind.xlsx'; sheet= num; xlswrite(filename,u1(:,[1 t/(dt*6)+1 t/(dt*3)+1 t/(dt*2)+1 (2*t)/(dt*3)+1 (5*t)/(dt*6)+1 t/dt+1]),sheet,'B3'); figure surf(u1);

Réponses (0)

Catégories

En savoir plus sur App Building dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by