change simulink m file name issue
1 次查看(过去 30 天)
显示 更早的评论
hi, i want use script to change the original name to new name, for example from VehicleSpeedLimiterDemand_cal.m ->vehiclespeedlimiterdemand_cal.m, how to do, thanks in advance.
0 个评论
采纳的回答
Aman
2023-7-14
Hi,
The reason for the error is that filesystems are generally case-insensitive. So, a workaround can be to first rename the file to another random name and then change it to a desired name.
originalName = 'VehicleSpeedLimiterDemand_cal.m';
newName = 'vehiclespeedlimiterdemand_cal.m';
movefile(originalName, 'some_other_name.m');
movefile('some_other_name.m',newName);
Hope this helps!
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!